Hi! Attached patch is the first part of the fix for ticket #1304.
Please comment, Carl Eugen
diff --git a/libavformat/riffenc.c b/libavformat/riffenc.c index 2eb2ae1..cf235c1 100644 --- a/libavformat/riffenc.c +++ b/libavformat/riffenc.c @@ -212,6 +212,8 @@ void ff_put_bmp_header(AVIOContext *pb, AVCodecContext *enc, int keep_height = enc->extradata_size >= 9 && !memcmp(enc->extradata + enc->extradata_size - 9, "BottomUp", 9); int extradata_size = enc->extradata_size - 9*keep_height; + if (enc->pix_fmt == AV_PIX_FMT_PAL8 && extradata_size >= AVPALETTE_SIZE) + extradata_size -= AVPALETTE_SIZE; /* size */ avio_wl32(pb, 40 + (ignore_extradata ? 0 :extradata_size));
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel