summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-07-13 01:07:59 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-08-08 16:19:48 +0200
commitfe461238d33e3b1ea9a8fdd8925d0ac584474fb6 (patch)
treecd091597b0a3ff62e876db2a1e08777f3da5a42d
parentb52952c6e96b7f1464a3829da9d9fec28ed262b3 (diff)
downloadffmpeg-fe461238d33e3b1ea9a8fdd8925d0ac584474fb6.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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 48882bed95..e42c1fc8f9 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1532,7 +1532,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);