Browse Source

avformat/mpegenc: Better heuristic for ordering packets

This prevents underflows in quite constrained cases

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.1
Michael Niedermayer 12 years ago
parent
commit
32cde96296
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      libavformat/mpegenc.c

+ 3
- 1
libavformat/mpegenc.c View File

@@ -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;


Loading…
Cancel
Save