diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-07-13 01:07:59 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-07-13 01:15:51 +0200 |
commit | 969d8b9d60c138482a806e543e61ff6ddd1dbb55 (patch) | |
tree | 904d555e77a21c35b3e033b9cc99137c98adc697 | |
parent | 31b1589097cd1934fd493e19bfc28d7aaaa478c6 (diff) | |
download | ffmpeg-969d8b9d60c138482a806e543e61ff6ddd1dbb55.tar.gz |
avformat/utils: do not wait for packets from discarded streams for genpts
Fixes long loop
Fixes Ticket3208
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 8202c49b43621c04e26d4a3aa83a10e1e5cc1836)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/utils.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index aaf4f9879f..df8209262e 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -1481,7 +1481,8 @@ int av_read_frame(AVFormatContext *s, AVPacket *pkt) } /* read packet from packet buffer, if there is data */ - if (!(next_pkt->pts == AV_NOPTS_VALUE && + st = s->streams[next_pkt->stream_index]; + if (!(next_pkt->pts == AV_NOPTS_VALUE && st->discard < AVDISCARD_ALL && next_pkt->dts != AV_NOPTS_VALUE && !eof)) { ret = read_from_packet_buffer(&s->packet_buffer, &s->packet_buffer_end, pkt); |