Commit 32cde962 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/mpegenc: Better heuristic for ordering packets

This prevents underflows in quite constrained cases
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 93040632
......@@ -955,7 +955,9 @@ retry:
if(next_pkt && next_pkt->dts - scr > max_delay)
continue;
if ( stream->predecode_packet
&& stream->predecode_packet->size > stream->buffer_index)
rel_space += 1<<28;
if(rel_space > best_score){
best_score= rel_space;
best_i = i;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment