Revision e5026c36
libavformat/utils.c | ||
---|---|---|
2741 | 2741 |
{ |
2742 | 2742 |
AVStream *st = s->streams[ pkt ->stream_index]; |
2743 | 2743 |
AVStream *st2= s->streams[ next->stream_index]; |
2744 |
int64_t left = st2->time_base.num * (int64_t)st ->time_base.den; |
|
2745 |
int64_t right= st ->time_base.num * (int64_t)st2->time_base.den; |
|
2746 |
|
|
2747 |
if (pkt->dts == AV_NOPTS_VALUE) |
|
2748 |
return 0; |
|
2749 |
|
|
2750 |
return next->dts * left > pkt->dts * right; //FIXME this can overflow |
|
2744 |
return av_compare_ts(next->dts, st2->time_base, pkt->dts, st->time_base) > 0; |
|
2751 | 2745 |
} |
2752 | 2746 |
|
2753 | 2747 |
int av_interleave_packet_per_dts(AVFormatContext *s, AVPacket *out, AVPacket *pkt, int flush){ |
Also available in: Unified diff