summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2008-01-28 21:13:40 +0000
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2008-01-28 21:13:40 +0000
commite1cc833926613626fd75499b005abf205e0898f1 (patch)
tree705fc85174e6499d2f62509c0aa8918154bd2429 /ffmpeg.c
parent79db7ac6ef235a06c3049d7792eda39da28ee3fd (diff)
Add sbsf option for subtitle bitstream filter
Originally committed as revision 11658 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index a4800685eb..555abe03f2 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -221,6 +221,7 @@ static int64_t timer_start;
static AVBitStreamFilterContext *video_bitstream_filters=NULL;
static AVBitStreamFilterContext *audio_bitstream_filters=NULL;
+static AVBitStreamFilterContext *subtitle_bitstream_filters=NULL;
static AVBitStreamFilterContext *bitstream_filters[MAX_FILES][MAX_STREAMS];
#define DEFAULT_PASS_LOGFILENAME "ffmpeg2pass"
@@ -3076,6 +3077,9 @@ static void new_subtitle_stream(AVFormatContext *oc)
}
avcodec_get_context_defaults2(st->codec, CODEC_TYPE_SUBTITLE);
+ bitstream_filters[nb_output_files][oc->nb_streams - 1]= subtitle_bitstream_filters;
+ subtitle_bitstream_filters= NULL;
+
subtitle_enc = st->codec;
subtitle_enc->codec_type = CODEC_TYPE_SUBTITLE;
if (subtitle_stream_copy) {
@@ -3693,7 +3697,9 @@ static int opt_bsf(const char *opt, const char *arg)
exit(1);
}
- bsfp= *opt == 'v' ? &video_bitstream_filters : &audio_bitstream_filters;
+ bsfp= *opt == 'v' ? &video_bitstream_filters :
+ *opt == 'a' ? &audio_bitstream_filters :
+ &subtitle_bitstream_filters;
while(*bsfp)
bsfp= &(*bsfp)->next;
@@ -3834,6 +3840,7 @@ const OptionDef options[] = {
{ "absf", OPT_FUNC2 | HAS_ARG | OPT_AUDIO | OPT_EXPERT, {(void*)opt_bsf}, "", "bitstream filter" },
{ "vbsf", OPT_FUNC2 | HAS_ARG | OPT_VIDEO | OPT_EXPERT, {(void*)opt_bsf}, "", "bitstream filter" },
+ { "sbsf", OPT_FUNC2 | HAS_ARG | OPT_SUBTITLE | OPT_EXPERT, {(void*)opt_bsf}, "", "bitstream filter" },
{ "default", OPT_FUNC2 | HAS_ARG | OPT_AUDIO | OPT_VIDEO | OPT_EXPERT, {(void*)opt_default}, "generic catch all option", "" },
{ NULL, },