[FFmpeg-cvslog] r21672 - trunk/libavformat/utils.c
michael
subversion
Sun Feb 7 17:27:17 CET 2010
Author: michael
Date: Sun Feb 7 17:27:17 2010
New Revision: 21672
Log:
Use av_compare_ts() for interleaving per dts.
Modified:
trunk/libavformat/utils.c
Modified: trunk/libavformat/utils.c
==============================================================================
--- trunk/libavformat/utils.c Sun Feb 7 17:26:50 2010 (r21671)
+++ trunk/libavformat/utils.c Sun Feb 7 17:27:17 2010 (r21672)
@@ -2741,13 +2741,7 @@ int ff_interleave_compare_dts(AVFormatCo
{
AVStream *st = s->streams[ pkt ->stream_index];
AVStream *st2= s->streams[ next->stream_index];
- int64_t left = st2->time_base.num * (int64_t)st ->time_base.den;
- int64_t right= st ->time_base.num * (int64_t)st2->time_base.den;
-
- if (pkt->dts == AV_NOPTS_VALUE)
- return 0;
-
- return next->dts * left > pkt->dts * right; //FIXME this can overflow
+ return av_compare_ts(next->dts, st2->time_base, pkt->dts, st->time_base) > 0;
}
int av_interleave_packet_per_dts(AVFormatContext *s, AVPacket *out, AVPacket *pkt, int flush){
More information about the ffmpeg-cvslog
mailing list