[FFmpeg-cvslog] avcodec/pngenc: Remove always-true check

Andreas Rheinhardt git at videolan.org
Sun May 23 16:42:36 EEST 2021


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Tue May 11 10:54:49 2021 +0200| [aaefb84b04a8a8d40b3d23ce4f0b0c92b093ddb9] | committer: Andreas Rheinhardt

avcodec/pngenc: Remove always-true check

Reviewed-by: James Almer <jamrial at gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=aaefb84b04a8a8d40b3d23ce4f0b0c92b093ddb9
---

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



More information about the ffmpeg-cvslog mailing list