Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-07-13 03:07:59 +0400
committerMichael Niedermayer <michaelni@gmx.at>2014-07-13 03:16:09 +0400
commit3a2c4453f04e467e52e66e439f389ac9ae49cc32 (patch)
tree20c42f96391766fea11f9de0dee3258185477e3f
parent7b5c706494a775b2b0d0e0a38448610802eef8f4 (diff)
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 18a0165dbc..fd9a2d6fe6 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1488,7 +1488,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);