Message ID | tencent_68CDCA7422BE728D27EA9E3A911E4D86BE06@qq.com |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel] Handle AV_PIX_FMT_PAL8 | expand |
Context | Check | Description |
---|---|---|
andriy/commit_summary | warning | The first line of the commit message must start with a context terminated by a colon and a space, for example "lavu/opt: " or "doc: ". |
andriy/x86_make | success | Make finished |
andriy/x86_make_fate | success | Make fate finished |
Ray (12021-08-15): > --- > libavformat/riffenc.c | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) Context still missing. Please send related patches in the same thread.
diff --git a/libavformat/riffenc.c b/libavformat/riffenc.c index 971c4a7eb8..6926fbf060 100644 --- a/libavformat/riffenc.c +++ b/libavformat/riffenc.c @@ -271,7 +271,14 @@ void ff_put_bmp_header(AVIOContext *pb, AVCodecParameters *par, if (i == 0 && pix_fmt == AV_PIX_FMT_MONOWHITE) avio_wl32(pb, 0xffffff); else if (i == 1 && pix_fmt == AV_PIX_FMT_MONOBLACK) - avio_wl32(pb, 0xffffff); + avio_wl32(pb, 0xffffff); + else if (pix_fmt == AV_PIX_FMT_PAL8) { + /* Initialize 8 bpp palette */ + avio_w8(pb,i); + avio_w8(pb,i); + avio_w8(pb,i); + avio_w8(pb,0); + } else avio_wl32(pb, 0); }