diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2010-02-07 16:27:17 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2010-02-07 16:27:17 +0000 |
commit | e5026c36d47a0d9a74eb53f79b8030cf8acd96af (patch) | |
tree | 3b91d986892b72081398b3cd53bb15264d5c9fb0 /libavformat | |
parent | 78b0182375e5d4eb27b044d976d40b3b5cd4c60d (diff) | |
download | ffmpeg-e5026c36d47a0d9a74eb53f79b8030cf8acd96af.tar.gz |
Use av_compare_ts() for interleaving per dts.
Originally committed as revision 21672 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/utils.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 58606b0da7..ef27e7e090 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2741,13 +2741,7 @@ int ff_interleave_compare_dts(AVFormatContext *s, AVPacket *next, AVPacket *pkt) { 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){ |