summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-04-30 21:38:40 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-04-30 22:09:15 +0200
commitfa1195227ff010bc22472688587fdcfa620f69de (patch)
treea1e023e58eaf85923ce97fcace59992badd46e87 /ffmpeg.c
parentffdc49df25ec275c17e7f3e0ae5893185e3d9b93 (diff)
FFMPEG: support demuxer specific options.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index bde23e0ba9..db9701d90d 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -3258,10 +3258,16 @@ static void opt_input_file(const char *filename)
ic->subtitle_codec_id=
find_codec_or_die(subtitle_codec_name, AVMEDIA_TYPE_SUBTITLE, 0,
avcodec_opts[AVMEDIA_TYPE_SUBTITLE]->strict_std_compliance);
- ic->flags |= AVFMT_FLAG_NONBLOCK;
+ ic->flags |= AVFMT_FLAG_NONBLOCK | AVFMT_FLAG_PRIV_OPT;
/* open the input file with generic libav function */
err = av_open_input_file(&ic, filename, file_iformat, 0, ap);
+ if(err >= 0){
+ set_context_opts(ic, avformat_opts, AV_OPT_FLAG_DECODING_PARAM, NULL);
+ err = av_demuxer_open(ic, ap);
+ if(err < 0)
+ avformat_free_context(ic);
+ }
if (err < 0) {
print_error(filename, err);
ffmpeg_exit(1);