Revision fa119522

View differences:

cmdutils.c
297 297
    int opt_types[]={AV_OPT_FLAG_VIDEO_PARAM, AV_OPT_FLAG_AUDIO_PARAM, 0, AV_OPT_FLAG_SUBTITLE_PARAM, 0};
298 298
    AVCodec *p = NULL;
299 299
    AVOutputFormat *oformat = NULL;
300
    AVInputFormat *iformat = NULL;
300 301

  
301 302
    while ((p = av_codec_next(p))) {
302 303
        AVClass *c = p->priv_class;
......
312 313
    }
313 314
    if (oformat)
314 315
        goto out;
316
    while ((iformat = av_iformat_next(iformat))) {
317
        const AVClass *c = iformat->priv_class;
318
        if (c && av_find_opt(&c, opt, NULL, 0, 0))
319
            break;
320
    }
321
    if (iformat)
322
        goto out;
315 323

  
316 324
    for(type=0; *avcodec_opts && type<AVMEDIA_TYPE_NB && ret>= 0; type++){
317 325
        const AVOption *o2 = av_find_opt(avcodec_opts[0], opt, NULL, opt_types[type], opt_types[type]);
......
415 423
        AVFormatContext *avctx = ctx;
416 424
        if (avctx->oformat && avctx->oformat->priv_class) {
417 425
            priv_ctx = avctx->priv_data;
426
        } else if (avctx->iformat && avctx->iformat->priv_class) {
427
            priv_ctx = avctx->priv_data;
418 428
        }
419 429
    }
420 430

  
ffmpeg.c
3258 3258
    ic->subtitle_codec_id=
3259 3259
        find_codec_or_die(subtitle_codec_name, AVMEDIA_TYPE_SUBTITLE, 0,
3260 3260
                          avcodec_opts[AVMEDIA_TYPE_SUBTITLE]->strict_std_compliance);
3261
    ic->flags |= AVFMT_FLAG_NONBLOCK;
3261
    ic->flags |= AVFMT_FLAG_NONBLOCK | AVFMT_FLAG_PRIV_OPT;
3262 3262

  
3263 3263
    /* open the input file with generic libav function */
3264 3264
    err = av_open_input_file(&ic, filename, file_iformat, 0, ap);
3265
    if(err >= 0){
3266
        set_context_opts(ic, avformat_opts, AV_OPT_FLAG_DECODING_PARAM, NULL);
3267
        err = av_demuxer_open(ic, ap);
3268
        if(err < 0)
3269
            avformat_free_context(ic);
3270
    }
3265 3271
    if (err < 0) {
3266 3272
        print_error(filename, err);
3267 3273
        ffmpeg_exit(1);

Also available in: Unified diff