Revision 72415b2a libavformat/swfdec.c

View differences:

libavformat/swfdec.c
97 97

  
98 98
            for (i=0; i<s->nb_streams; i++) {
99 99
                st = s->streams[i];
100
                if (st->codec->codec_type == CODEC_TYPE_VIDEO && st->id == ch_id)
100
                if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO && st->id == ch_id)
101 101
                    goto skip;
102 102
            }
103 103

  
......
109 109
            vst = av_new_stream(s, ch_id);
110 110
            if (!vst)
111 111
                return -1;
112
            vst->codec->codec_type = CODEC_TYPE_VIDEO;
112
            vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
113 113
            vst->codec->codec_id = ff_codec_get_id(swf_codec_tags, get_byte(pb));
114 114
            av_set_pts_info(vst, 16, 256, swf->frame_rate);
115 115
            vst->codec->time_base = (AVRational){ 256, swf->frame_rate };
......
120 120

  
121 121
            for (i=0; i<s->nb_streams; i++) {
122 122
                st = s->streams[i];
123
                if (st->codec->codec_type == CODEC_TYPE_AUDIO && st->id == -1)
123
                if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO && st->id == -1)
124 124
                    goto skip;
125 125
            }
126 126

  
......
131 131
            if (!ast)
132 132
                return -1;
133 133
            ast->codec->channels = 1 + (v&1);
134
            ast->codec->codec_type = CODEC_TYPE_AUDIO;
134
            ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;
135 135
            ast->codec->codec_id = ff_codec_get_id(swf_audio_codec_tags, (v>>4) & 15);
136 136
            ast->need_parsing = AVSTREAM_PARSE_FULL;
137 137
            sample_rate_code= (v>>2) & 3;
......
145 145
            len -= 2;
146 146
            for(i=0; i<s->nb_streams; i++) {
147 147
                st = s->streams[i];
148
                if (st->codec->codec_type == CODEC_TYPE_VIDEO && st->id == ch_id) {
148
                if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO && st->id == ch_id) {
149 149
                    frame = get_le16(pb);
150 150
                    av_get_packet(pb, pkt, len-2);
151 151
                    pkt->pos = pos;
......
157 157
        } else if (tag == TAG_STREAMBLOCK) {
158 158
            for (i = 0; i < s->nb_streams; i++) {
159 159
                st = s->streams[i];
160
                if (st->codec->codec_type == CODEC_TYPE_AUDIO && st->id == -1) {
160
                if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO && st->id == -1) {
161 161
            if (st->codec->codec_id == CODEC_ID_MP3) {
162 162
                url_fskip(pb, 4);
163 163
                av_get_packet(pb, pkt, len-4);
......
179 179
                vst = av_new_stream(s, -2); /* -2 to avoid clash with video stream and audio stream */
180 180
                if (!vst)
181 181
                    return -1;
182
                vst->codec->codec_type = CODEC_TYPE_VIDEO;
182
                vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
183 183
                vst->codec->codec_id = CODEC_ID_MJPEG;
184 184
                av_set_pts_info(vst, 64, 256, swf->frame_rate);
185 185
                vst->codec->time_base = (AVRational){ 256, swf->frame_rate };

Also available in: Unified diff