diff options
author | Wolfram Gloger <video06@malloc.de> | 2011-09-09 17:15:08 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-09-09 17:19:54 +0200 |
commit | 6dcbbe34e814b9d4f38217b712a9dbd137d64a30 (patch) | |
tree | 9f7600623fa7b2b0ed6f5221bd57c12c7f04fcb0 /libavformat/utils.c | |
parent | 88fddd0bcc97c214c4bbd2e2c9934dde35feb60b (diff) | |
download | ffmpeg-6dcbbe34e814b9d4f38217b712a9dbd137d64a30.tar.gz |
av_interleave_packet_per_dts: switch noninterleaved flushing logic to max dts.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r-- | libavformat/utils.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 706c2b4932..d08faeac47 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -3226,7 +3226,7 @@ static int ff_interleave_compare_dts(AVFormatContext *s, AVPacket *next, AVPacke int av_interleave_packet_per_dts(AVFormatContext *s, AVPacket *out, AVPacket *pkt, int flush){ AVPacketList *pktl; int stream_count=0, noninterleaved_count=0; - int64_t delta_dts_min = INT64_MAX; + int64_t delta_dts_max = 0; int i; if(pkt){ @@ -3253,11 +3253,11 @@ int av_interleave_packet_per_dts(AVFormatContext *s, AVPacket *out, AVPacket *pk av_rescale_q(s->packet_buffer->pkt.dts, s->streams[s->packet_buffer->pkt.stream_index]->time_base, AV_TIME_BASE_Q); - delta_dts_min = FFMIN(delta_dts_min, delta_dts); + delta_dts_max= FFMAX(delta_dts_max, delta_dts); } } if(s->nb_streams == stream_count+noninterleaved_count && - delta_dts_min > 20*AV_TIME_BASE) { + delta_dts_max > 20*AV_TIME_BASE) { av_log(s, AV_LOG_DEBUG, "flushing with %d noninterleaved\n", noninterleaved_count); flush = 1; } |