--
Mats Peterson
http://matsp888.no-ip.org/~mats/
>From ceaee5adb51c68bd35794f6c6165cd8c3f3b6619 Mon Sep 17 00:00:00 2001
From: Mats Peterson <matsp...@yahoo.com>
Date: Mon, 7 Mar 2016 08:58:30 +0100
Subject: [PATCH] lavf/avienc: Palette handling code only concerns AV_PIX_FMT_PAL8

---
 libavformat/avienc.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/libavformat/avienc.c b/libavformat/avienc.c
index 357dd34..b7fd12a 100644
--- a/libavformat/avienc.c
+++ b/libavformat/avienc.c
@@ -662,7 +662,6 @@ static int avi_write_packet(AVFormatContext *s, AVPacket *pkt)
     AVCodecContext *enc = s->streams[stream_index]->codec;
     AVIStream *avist    = s->streams[stream_index]->priv_data;
     AVPacket *opkt = pkt;
-    enum AVPixelFormat pix_fmt = enc->pix_fmt;
     int ret;
 
     if (enc->codec_id == AV_CODEC_ID_H264 && enc->codec_tag == MKTAG('H','2','6','4') && pkt->size) {
@@ -686,11 +685,7 @@ static int avi_write_packet(AVFormatContext *s, AVPacket *pkt)
                 return ret;
         } else
             ret = 0;
-        if (pix_fmt == AV_PIX_FMT_NONE && enc->bits_per_coded_sample == 1)
-            pix_fmt = AV_PIX_FMT_MONOWHITE;
-        if (pix_fmt == AV_PIX_FMT_PAL8 ||
-            pix_fmt == AV_PIX_FMT_MONOWHITE ||
-            pix_fmt == AV_PIX_FMT_MONOBLACK) {
+        if (enc->pix_fmt == AV_PIX_FMT_PAL8) {
             int ret2 = ff_get_packet_palette(s, opkt, ret, avist->palette);
             if (ret2 < 0)
                 return ret2;
-- 
1.7.10.4

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to