summaryrefslogtreecommitdiff
path: root/libavformat/gif.c
diff options
context:
space:
mode:
authorLuca Abeni <lucabe72@email.it>2006-08-02 09:48:05 +0000
committerLuca Abeni <lucabe72@email.it>2006-08-02 09:48:05 +0000
commit20dd25adc3595c60c7215504a4df9db64e17dabc (patch)
tree0a2356ad013ef9d8f9ad097aca46a68bc8741cd1 /libavformat/gif.c
parente81e3ced6df0ca98cbc4dbefcee33e6a494eebcc (diff)
Do not set the codec's pixel format in the format's write_header()
Originally committed as revision 5887 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/gif.c')
-rw-r--r--libavformat/gif.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/gif.c b/libavformat/gif.c
index bef98d3ac4..f9a891ff57 100644
--- a/libavformat/gif.c
+++ b/libavformat/gif.c
@@ -339,8 +339,10 @@ static int gif_write_header(AVFormatContext *s)
// 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);