Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-09-26 05:13:38 +0400
committerMichael Niedermayer <michaelni@gmx.at>2013-09-26 05:13:38 +0400
commit32cde962969363bebc4ad49b770ffff39487d3f8 (patch)
tree1ba606d41dbf6e49aa0902a4d5042b1881b48f37 /libavformat/mpegenc.c
parent930406325c2973b02b5bb0dc28e09947bea84053 (diff)
avformat/mpegenc: Better heuristic for ordering packets
This prevents underflows in quite constrained cases Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mpegenc.c')
-rw-r--r--libavformat/mpegenc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/mpegenc.c b/libavformat/mpegenc.c
index 47a7cedfe1..811fe2d9c3 100644
--- a/libavformat/mpegenc.c
+++ b/libavformat/mpegenc.c
@@ -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;