aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-09-22 18:57:47 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-09-22 18:57:47 +0200
commit8ccb56abeeecb71a6e77ecc8cbb5370ee993176a (patch)
tree1a3d22ff0a1f2ef91766f4c3b70265dc29a4fffc
parenta4271f3d4e4efd749e5101aa2cefa5e483bc7989 (diff)
downloadffmpeg-8ccb56abeeecb71a6e77ecc8cbb5370ee993176a.tar.gz
ffmpeg/opt_output_file: extract subtitle codec name through new API
This should fix specifying subtitle codecs with the new syntax in some cases. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--ffmpeg_opt.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c
index 2e94686894..e759125c83 100644
--- a/ffmpeg_opt.c
+++ b/ffmpeg_opt.c
@@ -1496,6 +1496,7 @@ void opt_output_file(void *optctx, const char *filename)
}
}
} else if (!o->nb_stream_maps) {
+ char *subtitle_codec_name = NULL;
/* pick the "best" stream of each type */
/* video: highest resolution */
@@ -1532,6 +1533,7 @@ void opt_output_file(void *optctx, const char *filename)
}
/* subtitles: pick first */
+ MATCH_PER_TYPE_OPT(codec_names, str, subtitle_codec_name, oc, "s");
if (!o->subtitle_disable && (oc->oformat->subtitle_codec != AV_CODEC_ID_NONE || subtitle_codec_name)) {
for (i = 0; i < nb_input_streams; i++)
if (input_streams[i]->st->codec->codec_type == AVMEDIA_TYPE_SUBTITLE) {