Revision fa119522 cmdutils.c

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

  

Also available in: Unified diff