diff options
author | Michael Niedermayer <[email protected]> | 2014-03-16 15:15:02 +0100 |
---|---|---|
committer | Carl Eugen Hoyos <[email protected]> | 2014-03-17 15:45:49 +0100 |
commit | 48609236daf85d1974c4a23d22e6eb63d5132c3e (patch) | |
tree | 995e2f18b8033d03e589a7045f5b98665523f279 | |
parent | d8fe6957796a95f936d7b16db559a164db7e9de4 (diff) |
ffmpeg_opt: check that a subtitle encoder is available before auto mapping streams
Fixes Ticket3470
Signed-off-by: Michael Niedermayer <[email protected]>
(cherry picked from commit 25bcf24d4d0faf0191923be8afac8f67ca98b500)
-rw-r--r-- | ffmpeg_opt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c index 7bd0817c29..ba2df02e47 100644 --- a/ffmpeg_opt.c +++ b/ffmpeg_opt.c @@ -1821,7 +1821,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); |