mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2025-01-31 09:02:39 +00:00
ffmpeg_opt: check that a subtitle encoder is available before auto mapping streams
Fixes Ticket3470 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
267c5723e0
commit
25bcf24d4d
@ -1833,7 +1833,7 @@ static int open_output_file(OptionsContext *o, 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)) {
|
||||
if (!o->subtitle_disable && (avcodec_find_encoder(oc->oformat->subtitle_codec) || subtitle_codec_name)) {
|
||||
for (i = 0; i < nb_input_streams; i++)
|
||||
if (input_streams[i]->st->codec->codec_type == AVMEDIA_TYPE_SUBTITLE) {
|
||||
new_subtitle_stream(o, oc, i);
|
||||
|
Loading…
x
Reference in New Issue
Block a user