Revision d860aaf8 cmdutils.c

View differences:

cmdutils.c
198 198
    const AVOption *o= NULL;
199 199
    int opt_types[]={AV_OPT_FLAG_VIDEO_PARAM, AV_OPT_FLAG_AUDIO_PARAM, 0, AV_OPT_FLAG_SUBTITLE_PARAM, 0};
200 200

  
201
    for(type=0; type<AVMEDIA_TYPE_NB && ret>= 0; type++){
201
    for(type=0; *avcodec_opts && type<AVMEDIA_TYPE_NB && ret>= 0; type++){
202 202
        const AVOption *o2 = av_find_opt(avcodec_opts[0], opt, NULL, opt_types[type], opt_types[type]);
203 203
        if(o2)
204 204
            ret = av_set_string3(avcodec_opts[type], opt, arg, 1, &o);
205 205
    }
206
    if(!o)
206
    if(!o && avformat_opts)
207 207
        ret = av_set_string3(avformat_opts, opt, arg, 1, &o);
208 208
    if(!o && sws_opts)
209 209
        ret = av_set_string3(sws_opts, opt, arg, 1, &o);

Also available in: Unified diff