[Bf-blender-cvs] [9279bee] master: remove repeated codec-supports-alpha check

Mike Erwin noreply at git.blender.org
Thu Jul 21 19:51:05 CEST 2016


Commit: 9279bee58302f70fed3549887835e1374a032bd7
Author: Mike Erwin
Date:   Thu Jul 21 13:50:35 2016 -0400
Branches: master
https://developer.blender.org/rB9279bee58302f70fed3549887835e1374a032bd7

remove repeated codec-supports-alpha check

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

===================================================================

M	source/blender/blenkernel/intern/writeffmpeg.c

===================================================================

diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c
index edeccf4..9dbc045 100644
--- a/source/blender/blenkernel/intern/writeffmpeg.c
+++ b/source/blender/blenkernel/intern/writeffmpeg.c
@@ -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;




More information about the Bf-blender-cvs mailing list