diff mbox series

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

Message ID HE1PR0301MB215448E37BBFD2FC811696668F299@HE1PR0301MB2154.eurprd03.prod.outlook.com
State Accepted
Commit aaefb84b04a8a8d40b3d23ce4f0b0c92b093ddb9
Headers show
Series [FFmpeg-devel,01/39] avcodec/audiotoolboxenc: Remove AV_CODEC_CAP_DR1 | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Andreas Rheinhardt May 21, 2021, 9:17 a.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/pngenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

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) {