remove repeated codec-supports-alpha check
authorMike Erwin <significant.bit@gmail.com>
Thu, 21 Jul 2016 17:50:35 +0000 (13:50 -0400)
committerMike Erwin <significant.bit@gmail.com>
Thu, 21 Jul 2016 17:50:35 +0000 (13:50 -0400)
I don’t think any other codec enum makes sense here, so probably just
an extra copy/paste. Here are the video codecs:

AV_CODEC_ID_NONE
AV_CODEC_ID_MPEG4
AV_CODEC_ID_MJPEG
AV_CODEC_ID_DNXHD
AV_CODEC_ID_MPEG2VIDEO
AV_CODEC_ID_MPEG1VIDEO
AV_CODEC_ID_DVVIDEO
AV_CODEC_ID_THEORA
AV_CODEC_ID_PNG <— alpha
AV_CODEC_ID_QTRLE <— alpha
AV_CODEC_ID_FFV1 <— alpha (if enabled)
AV_CODEC_ID_HUFFYUV <— alpha
AV_CODEC_ID_H264
AV_CODEC_ID_FLV1

Found with PVS-Studio T48917

source/blender/blenkernel/intern/writeffmpeg.c

index edeccf472c833c864483eb8f17331d8c74e6a1b0..9dbc045f1b04aaf29ce3a88acae08b27173bb45a 100644 (file)
@@ -1672,9 +1672,6 @@ bool BKE_ffmpeg_alpha_channel_is_supported(RenderData *rd)
        if (codec == AV_CODEC_ID_PNG)
                return true;
 
-       if (codec == AV_CODEC_ID_PNG)
-               return true;
-
        if (codec == AV_CODEC_ID_HUFFYUV)
                return true;