[FFmpeg-devel] [PATCH]Use enum CodecID in ffmpeg.c

Carl Eugen Hoyos cehoyos
Tue Jun 30 19:52:52 CEST 2009


Hi!

Attached patch reduces the number of warnings when compiling ffmpeg.c with 
icc.

/home/fate/fate64/source/ffmpeg.c(3100): warning #188: enumerated type 
mixed with another type
               codec = avcodec_find_encoder(codec_id);
                                            ^

/home/fate/fate64/source/ffmpeg.c(3103): warning #188: enumerated type 
mixed with another type
           video_enc->codec_id = codec_id;
                               ^

/home/fate/fate64/source/ffmpeg.c(3235): warning #188: enumerated type 
mixed with another type
               codec = avcodec_find_encoder(codec_id);
                                            ^

/home/fate/fate64/source/ffmpeg.c(3237): warning #188: enumerated type 
mixed with another type
           audio_enc->codec_id = codec_id;
                               ^

Please comment, Carl Eugen
-------------- next part --------------
Index: ffmpeg.c
===================================================================
--- ffmpeg.c	(revision 19281)
+++ ffmpeg.c	(working copy)
@@ -3051,7 +3051,7 @@
 {
     AVStream *st;
     AVCodecContext *video_enc;
-    int codec_id;
+    enum CodecID codec_id;
 
     st = av_new_stream(oc, oc->nb_streams);
     if (!st) {
@@ -3193,7 +3193,7 @@
 {
     AVStream *st;
     AVCodecContext *audio_enc;
-    int codec_id;
+    enum CodecID codec_id;
 
     st = av_new_stream(oc, oc->nb_streams);
     if (!st) {



More information about the ffmpeg-devel mailing list