aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-11-03 22:55:07 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-11-03 22:55:07 +0100
commitdb0471c40f0fb30355c07cca5fe7317ab6778b5a (patch)
tree0384e72efebd16e2daf938d0c293a0df1225ab9a
parenta7f25979dd568f4f7253ebb3e30f802c7009fbaa (diff)
downloadffmpeg-db0471c40f0fb30355c07cca5fe7317ab6778b5a.tar.gz
avformat/mpegts: Continue parsing PMTs during duration estimation
This way if we by chance run into a valid PMT we have a more complete set of streams, also do not reset streams in case we run into a worse PMT Fixes Ticket4046 alternatively Ticket4046 could be closed as invalid or wontfix as it contains some PMTs which lack the 2 subtitle streams Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/mpegts.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 8e639e092f..45e0719df3 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -1803,10 +1803,10 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
if (h->tid != PMT_TID)
return;
- if (ts->skip_changes)
- return;
- clear_program(ts, h->id);
+ if (!ts->skip_clear)
+ clear_program(ts, h->id);
+
pcr_pid = get16(&p, p_end);
if (pcr_pid < 0)
return;