comparison gif.c @ 5910:536e5527c1e0 libavformat

Define AVMediaType enum, and use it instead of enum CodecType, which is deprecated and will be dropped at the next major bump.
author stefano
date Tue, 30 Mar 2010 23:30:55 +0000
parents 1800b33b2c15
children
comparison
equal deleted inserted replaced
5909:b8041f85c327 5910:536e5527c1e0
264 gif->file_time = 0; 264 gif->file_time = 0;
265 265
266 video_enc = NULL; 266 video_enc = NULL;
267 for(i=0;i<s->nb_streams;i++) { 267 for(i=0;i<s->nb_streams;i++) {
268 enc = s->streams[i]->codec; 268 enc = s->streams[i]->codec;
269 if (enc->codec_type != CODEC_TYPE_AUDIO) 269 if (enc->codec_type != AVMEDIA_TYPE_AUDIO)
270 video_enc = enc; 270 video_enc = enc;
271 } 271 }
272 272
273 if (!video_enc) { 273 if (!video_enc) {
274 av_free(gif); 274 av_free(gif);
327 } 327 }
328 328
329 static int gif_write_packet(AVFormatContext *s, AVPacket *pkt) 329 static int gif_write_packet(AVFormatContext *s, AVPacket *pkt)
330 { 330 {
331 AVCodecContext *codec = s->streams[pkt->stream_index]->codec; 331 AVCodecContext *codec = s->streams[pkt->stream_index]->codec;
332 if (codec->codec_type == CODEC_TYPE_AUDIO) 332 if (codec->codec_type == AVMEDIA_TYPE_AUDIO)
333 return 0; /* just ignore audio */ 333 return 0; /* just ignore audio */
334 else 334 else
335 return gif_write_video(s, codec, pkt->data, pkt->size); 335 return gif_write_video(s, codec, pkt->data, pkt->size);
336 } 336 }
337 337