Mercurial > libavformat.hg
changeset 1220:ea469913fb68 libavformat
Do not set the codec's pixel format in the format's write_header()
| author | lucabe |
|---|---|
| date | Wed, 02 Aug 2006 09:48:05 +0000 |
| parents | 462a4f4e148c |
| children | ad456312dd5e |
| files | gif.c |
| diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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);
