[FFmpeg-devel] [PATCH] Handle AV_PIX_FMT_PAL8
mypopy at gmail.com
mypopy at gmail.com
Mon Aug 16 11:05:18 EEST 2021
The patch was broken
On Sun, Aug 15, 2021 at 5:22 PM 一滴水 <229135609 at qq.com> wrote:
>
> Signed-off-by: Ray <229135609 at qq.com>
> ---
> libavformat/riffenc.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> 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);
> }
> --
> 2.30.1 (Apple Git-130)
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
--
=======================================
Jun zhao/赵军
+++++++++++++++++++++++++++++++++++++++
More information about the ffmpeg-devel
mailing list