diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-03-16 15:15:02 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-03-16 15:15:02 +0100 |
commit | 25bcf24d4d0faf0191923be8afac8f67ca98b500 (patch) | |
tree | 29c5a22b8a7c39257aacb99f0146f610832de2ad /ffmpeg_opt.c | |
parent | 267c5723e08e04346e447b1e58cf81c80b13f799 (diff) | |
download | ffmpeg-25bcf24d4d0faf0191923be8afac8f67ca98b500.tar.gz |
ffmpeg_opt: check that a subtitle encoder is available before auto mapping streams
Fixes Ticket3470
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg_opt.c')
-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 ea94dd0f42..c60d77686a 100644 --- a/ffmpeg_opt.c +++ b/ffmpeg_opt.c @@ -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); |