summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-10-08 19:21:22 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-10-08 19:21:22 +0200
commitdc46692ded751b075abd6d0187519f3d80eab6d1 (patch)
tree455abb9f4d780f86dccddbdd481317436f169b7b /ffmpeg.c
parent92ec66f983417f4ccf1cc8aa285f851795176fb8 (diff)
ffmpeg: fix setting codecs for demuxers.
Bug introduced by: commit e3bf4e292cf999c9b8442a4e23677cab0b4781a9 Author: Anton Khirnov <anton@khirnov.net> Date: Tue Aug 30 04:10:54 2011 +0200 ffmpeg: replace -vcodec/-acodec/-scodec with a better system. The new option doesn't depend on its placement wrt -new* options (which don't exist anymore) and works in a similar way as per-stream AVOptions. -[vas]codec remain as aliases to -codec:[vas] Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index b5b2cbd990..5e9fcf197c 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -3118,6 +3118,12 @@ static int opt_input_file(OptionsContext *o, const char *opt, const char *filena
if (o->nb_frame_pix_fmts)
av_dict_set(&format_opts, "pixel_format", o->frame_pix_fmts[o->nb_frame_pix_fmts - 1].u.str, 0);
+ ic->video_codec_id =
+ find_codec_or_die(video_codec_name , AVMEDIA_TYPE_VIDEO , 0);
+ ic->audio_codec_id =
+ find_codec_or_die(audio_codec_name , AVMEDIA_TYPE_AUDIO , 0);
+ ic->subtitle_codec_id=
+ find_codec_or_die(subtitle_codec_name, AVMEDIA_TYPE_SUBTITLE, 0);
ic->flags |= AVFMT_FLAG_NONBLOCK;
if (loop_input) {