[FFmpeg-devel] [PATCH 22/39] avcodec/pngenc: Remove always-true check

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Fri May 21 12:17:25 EEST 2021


Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
 libavcodec/pngenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/pngenc.c b/libavcodec/pngenc.c
index a398155100..5a376765cf 100644
--- a/libavcodec/pngenc.c
+++ b/libavcodec/pngenc.c
@@ -847,7 +847,7 @@ static int encode_apng(AVCodecContext *avctx, AVPacket *pkt,
     size_t max_packet_size;
     APNGFctlChunk fctl_chunk = {0};
 
-    if (pict && avctx->codec_id == AV_CODEC_ID_APNG && s->color_type == PNG_COLOR_TYPE_PALETTE) {
+    if (pict && s->color_type == PNG_COLOR_TYPE_PALETTE) {
         uint32_t checksum = ~av_crc(av_crc_get_table(AV_CRC_32_IEEE_LE), ~0U, pict->data[1], 256 * sizeof(uint32_t));
 
         if (avctx->frame_number == 0) {
-- 
2.27.0



More information about the ffmpeg-devel mailing list