# HG changeset patch # User lucabe # Date 1154512085 0 # Node ID ea469913fb68e3e0db983049fa373adbc4af8018 # Parent 462a4f4e148c3f24323b1335697691b1c6c43f23 Do not set the codec's pixel format in the format's write_header() diff -r 462a4f4e148c -r ea469913fb68 gif.c --- a/gif.c Wed Aug 02 08:45:10 2006 +0000 +++ b/gif.c Wed Aug 02 09:48:05 2006 +0000 @@ -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);