summaryrefslogtreecommitdiff
path: root/libavformat/mpegts.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-07-12 21:49:15 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-07-12 21:49:15 +0200
commit4470a3eeafa97d20b1e68a6b40490f71da726adf (patch)
tree61fe6da41d3880734f0f3ec252df14dcbe349973 /libavformat/mpegts.c
parent1db641cbd2170808dc1de81e86bee1900e5dd65c (diff)
avformat/mpegts: dont clear programs during probing
Fixes Ticket 3763 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mpegts.c')
-rw-r--r--libavformat/mpegts.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index e814ab49a0..71140888a5 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -138,6 +138,7 @@ struct MpegTSContext {
int64_t last_pos;
int skip_changes;
+ int skip_clear;
/******************************************/
/* private mpegts data */
@@ -177,6 +178,8 @@ static const AVOption mpegts_options[] = {
{.i64 = 0}, 0, 0, AV_OPT_FLAG_DECODING_PARAM | AV_OPT_FLAG_EXPORT | AV_OPT_FLAG_READONLY },
{"skip_changes", "Skip changing / adding streams / programs.", offsetof(MpegTSContext, skip_changes), AV_OPT_TYPE_INT,
{.i64 = 0}, 0, 1, 0 },
+ {"skip_clear", "Skip clearing programs.", offsetof(MpegTSContext, skip_clear), AV_OPT_TYPE_INT,
+ {.i64 = 0}, 0, 1, 0 },
{ NULL },
};
@@ -1931,7 +1934,7 @@ static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
for (i = 0; i < ts->nb_prg; i++)
if (ts->prg[i].id == ts->stream->programs[j]->id)
break;
- if (i==ts->nb_prg)
+ if (i==ts->nb_prg && !ts->skip_clear)
clear_avprogram(ts, ts->stream->programs[j]->id);
}
}