]> git.sesse.net Git - ffmpeg/commitdiff
lavc/libvpxenc: remove redundant condition check
authorJun Zhao <barryjzhao@tencent.com>
Fri, 10 May 2019 13:02:40 +0000 (21:02 +0800)
committerJun Zhao <barryjzhao@tencent.com>
Sun, 12 May 2019 06:17:52 +0000 (14:17 +0800)
Redundant condition: '!A || B' is equivalent to '!A || (A && B)' but
more clearly.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
libavcodec/libvpxenc.c

index c823b8ad8bf7520d27c239e6fc3a9553651d492a..feb52ea0dd0a65311a43107f96712162c85493b2 100644 (file)
@@ -978,7 +978,7 @@ static int queue_frames(AVCodecContext *avctx, AVPacket *pkt_out)
        are only good through the next vpx_codec call */
     while ((pkt = vpx_codec_get_cx_data(&ctx->encoder, &iter)) &&
            (!ctx->is_alpha ||
-            (ctx->is_alpha && (pkt_alpha = vpx_codec_get_cx_data(&ctx->encoder_alpha, &iter_alpha))))) {
+            (pkt_alpha = vpx_codec_get_cx_data(&ctx->encoder_alpha, &iter_alpha)))) {
         switch (pkt->kind) {
         case VPX_CODEC_CX_FRAME_PKT:
             if (!size) {