Revision 72415b2a cmdutils.c

View differences:

cmdutils.c
48 48

  
49 49
const char **opt_names;
50 50
static int opt_name_count;
51
AVCodecContext *avcodec_opts[CODEC_TYPE_NB];
51
AVCodecContext *avcodec_opts[AVMEDIA_TYPE_NB];
52 52
AVFormatContext *avformat_opts;
53 53
struct SwsContext *sws_opts;
54 54

  
......
191 191
    const AVOption *o= NULL;
192 192
    int opt_types[]={AV_OPT_FLAG_VIDEO_PARAM, AV_OPT_FLAG_AUDIO_PARAM, 0, AV_OPT_FLAG_SUBTITLE_PARAM, 0};
193 193

  
194
    for(type=0; type<CODEC_TYPE_NB && ret>= 0; type++){
194
    for(type=0; type<AVMEDIA_TYPE_NB && ret>= 0; type++){
195 195
        const AVOption *o2 = av_find_opt(avcodec_opts[0], opt, NULL, opt_types[type], opt_types[type]);
196 196
        if(o2)
197 197
            ret = av_set_string3(avcodec_opts[type], opt, arg, 1, &o);
......
202 202
        ret = av_set_string3(sws_opts, opt, arg, 1, &o);
203 203
    if(!o){
204 204
        if(opt[0] == 'a')
205
            ret = av_set_string3(avcodec_opts[CODEC_TYPE_AUDIO], opt+1, arg, 1, &o);
205
            ret = av_set_string3(avcodec_opts[AVMEDIA_TYPE_AUDIO], opt+1, arg, 1, &o);
206 206
        else if(opt[0] == 'v')
207
            ret = av_set_string3(avcodec_opts[CODEC_TYPE_VIDEO], opt+1, arg, 1, &o);
207
            ret = av_set_string3(avcodec_opts[AVMEDIA_TYPE_VIDEO], opt+1, arg, 1, &o);
208 208
        else if(opt[0] == 's')
209
            ret = av_set_string3(avcodec_opts[CODEC_TYPE_SUBTITLE], opt+1, arg, 1, &o);
209
            ret = av_set_string3(avcodec_opts[AVMEDIA_TYPE_SUBTITLE], opt+1, arg, 1, &o);
210 210
    }
211 211
    if (o && ret < 0) {
212 212
        fprintf(stderr, "Invalid value '%s' for option '%s'\n", arg, opt);
......
535 535
        last_name= p2->name;
536 536

  
537 537
        switch(p2->type) {
538
        case CODEC_TYPE_VIDEO:
538
        case AVMEDIA_TYPE_VIDEO:
539 539
            type_str = "V";
540 540
            break;
541
        case CODEC_TYPE_AUDIO:
541
        case AVMEDIA_TYPE_AUDIO:
542 542
            type_str = "A";
543 543
            break;
544
        case CODEC_TYPE_SUBTITLE:
544
        case AVMEDIA_TYPE_SUBTITLE:
545 545
            type_str = "S";
546 546
            break;
547 547
        default:

Also available in: Unified diff