aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-10-23 16:07:31 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-10-23 18:19:37 +0200
commitb76234c00c7cac154dac50f4993e4372e47e3718 (patch)
tree1eaf58d43efee4216bcf30908b723d606901ef39
parentad83cfec5ad2079acf2defcae1b578446b1d21da (diff)
downloadffmpeg-b76234c00c7cac154dac50f4993e4372e47e3718.tar.gz
avformat/avidec: Forward whitelists to the subtitle demuxer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/avidec.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index fa6821ca1c..e4f43a29a7 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -996,7 +996,7 @@ fail:
return 0;
}
-static int read_gab2_sub(AVStream *st, AVPacket *pkt)
+static int read_gab2_sub(AVFormatContext *s, AVStream *st, AVPacket *pkt)
{
if (pkt->size >= 7 &&
pkt->size < INT_MAX - AVPROBE_PADDING_SIZE &&
@@ -1039,6 +1039,11 @@ static int read_gab2_sub(AVStream *st, AVPacket *pkt)
goto error;
ast->sub_ctx->pb = pb;
+
+ av_assert0(!ast->sub_ctx->codec_whitelist && !ast->sub_ctx->format_whitelist);
+ ast->sub_ctx-> codec_whitelist = av_strdup(s->codec_whitelist);
+ ast->sub_ctx->format_whitelist = av_strdup(s->format_whitelist);
+
if (!avformat_open_input(&ast->sub_ctx, "", sub_demuxer, NULL)) {
ff_read_packet(ast->sub_ctx, &ast->sub_pkt);
*st->codec = *ast->sub_ctx->streams[0]->codec;
@@ -1390,7 +1395,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
if (size < 0)
av_free_packet(pkt);
} else if (st->codec->codec_type == AVMEDIA_TYPE_SUBTITLE &&
- !st->codec->codec_tag && read_gab2_sub(st, pkt)) {
+ !st->codec->codec_tag && read_gab2_sub(s, st, pkt)) {
ast->frame_offset++;
avi->stream_index = -1;
ast->remaining = 0;