[Ffmpeg-cvslog] r5887 - in trunk: libavformat/gif.c tests/regression.sh

lucabe subversion
Wed Aug 2 11:48:05 CEST 2006


Author: lucabe
Date: Wed Aug  2 11:48:05 2006
New Revision: 5887

Modified:
   trunk/libavformat/gif.c
   trunk/tests/regression.sh

Log:
Do not set the codec's pixel format in the format's write_header()


Modified: trunk/libavformat/gif.c
==============================================================================
--- trunk/libavformat/gif.c	(original)
+++ trunk/libavformat/gif.c	Wed Aug  2 11:48:05 2006
@@ -339,8 +339,10 @@
 //        rate = video_enc->time_base.den;
     }
 
-    /* XXX: is it allowed ? seems to work so far... */
-    video_enc->pix_fmt = PIX_FMT_RGB24;
+    if (video_enc->pix_fmt != PIX_FMT_RGB24) {
+        av_log(s, AV_LOG_ERROR, "ERROR: gif only handles the rgb24 pixel format. Use -pix_fmt rgb24.\n");
+        return AVERROR_IO;
+    }
 
     gif_image_write_header(pb, width, height, loop_count, NULL);
 

Modified: trunk/tests/regression.sh
==============================================================================
--- trunk/tests/regression.sh	(original)
+++ trunk/tests/regression.sh	Wed Aug  2 11:48:05 2006
@@ -691,7 +691,7 @@
 
 # gif
 file=${outfile}libav.gif
-do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src $file
+do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -pix_fmt rgb24 $file
 #do_ffmpeg_crc $file -i $file
 
 # yuv4mpeg




More information about the ffmpeg-cvslog mailing list