summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-11-13 19:48:03 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-11-13 21:45:53 +0100
commiteab022d863c8505ce7786c82f0e0c3a8f4eeb4bd (patch)
tree290210b7d0e46339ba2d0bfdba4b35fcd59e7a0c
parent4392e69ad4e45c3de4d9e28466530698ca704c51 (diff)
downloadffmpeg-eab022d863c8505ce7786c82f0e0c3a8f4eeb4bd.tar.gz
mpegts: prevent freeing ones own section in pat_cb
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/mpegts.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 946e31ab7b..9e3f3420d7 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -1594,6 +1594,9 @@ static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
break;
pmt_pid &= 0x1fff;
+ if (pmt_pid == ts->current_pid)
+ break;
+
av_dlog(ts->stream, "sid=0x%x pid=0x%x\n", sid, pmt_pid);
if (sid == 0x0000) {