[FFmpeg-cvslog] av_interleave_packet_per_dts: switch noninterleaved flushing logic to max dts.
Wolfram Gloger
git at videolan.org
Fri Sep 9 17:20:52 CEST 2011
ffmpeg | branch: master | Wolfram Gloger <video06 at malloc.de> | Fri Sep 9 17:15:08 2011 +0200| [6dcbbe34e814b9d4f38217b712a9dbd137d64a30] | committer: Michael Niedermayer
av_interleave_packet_per_dts: switch noninterleaved flushing logic to max dts.
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6dcbbe34e814b9d4f38217b712a9dbd137d64a30
---
libavformat/utils.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 706c2b4..d08faea 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;
}
More information about the ffmpeg-cvslog
mailing list