Revision 72415b2a libavformat/raw.c

View differences:

libavformat/raw.c
74 74

  
75 75
        id = s->iformat->value;
76 76
        if (id == CODEC_ID_RAWVIDEO) {
77
            st->codec->codec_type = CODEC_TYPE_VIDEO;
77
            st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
78 78
        } else {
79
            st->codec->codec_type = CODEC_TYPE_AUDIO;
79
            st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
80 80
        }
81 81
        st->codec->codec_id = id;
82 82

  
83 83
        switch(st->codec->codec_type) {
84
        case CODEC_TYPE_AUDIO:
84
        case AVMEDIA_TYPE_AUDIO:
85 85
            st->codec->sample_rate = ap->sample_rate;
86 86
            if(ap->channels) st->codec->channels = ap->channels;
87 87
            else             st->codec->channels = 1;
......
90 90
            st->codec->block_align = st->codec->bits_per_coded_sample*st->codec->channels/8;
91 91
            av_set_pts_info(st, 64, 1, st->codec->sample_rate);
92 92
            break;
93
        case CODEC_TYPE_VIDEO:
93
        case AVMEDIA_TYPE_VIDEO:
94 94
            if(ap->time_base.num)
95 95
                av_set_pts_info(st, 64, ap->time_base.num, ap->time_base.den);
96 96
            else
......
253 253
    AVStream *st = av_new_stream(s, 0);
254 254
    if (!st)
255 255
        return AVERROR(ENOMEM);
256
    st->codec->codec_type = CODEC_TYPE_AUDIO;
256
    st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
257 257
    st->codec->codec_id = s->iformat->value;
258 258
    st->need_parsing = AVSTREAM_PARSE_FULL;
259 259
    /* the parameters will be extracted from the compressed bitstream */
......
271 271
    if (!st)
272 272
        return AVERROR(ENOMEM);
273 273

  
274
    st->codec->codec_type = CODEC_TYPE_VIDEO;
274
    st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
275 275
    st->codec->codec_id = s->iformat->value;
276 276
    st->need_parsing = AVSTREAM_PARSE_FULL;
277 277

  
......
700 700
    if (!st)
701 701
        return AVERROR(ENOMEM);
702 702

  
703
    st->codec->codec_type = CODEC_TYPE_AUDIO;
703
    st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
704 704
    st->codec->codec_id = s->iformat->value;
705 705
    st->need_parsing = AVSTREAM_PARSE_FULL;
706 706

  

Also available in: Unified diff