[FFmpeg-devel] [PATCH 5/6] lavc/mlpenc: remove the redundant condition check

Jun Zhao mypopydev at gmail.com
Fri May 10 19:05:53 EEST 2019


From: Jun Zhao <barryjzhao at tencent.com>

remove the redundant condition check for 'frame'

Signed-off-by: Jun Zhao <barryjzhao at tencent.com>
---
 libavcodec/mlpenc.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/libavcodec/mlpenc.c b/libavcodec/mlpenc.c
index 7536d3b..deb1716 100644
--- a/libavcodec/mlpenc.c
+++ b/libavcodec/mlpenc.c
@@ -2232,10 +2232,8 @@ static int mlp_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
         return 1;
 
     /* add current frame to queue */
-    if (frame) {
-        if ((ret = ff_af_queue_add(&ctx->afq, frame)) < 0)
-            return ret;
-    }
+    if ((ret = ff_af_queue_add(&ctx->afq, frame)) < 0)
+        return ret;
 
     data = frame->data[0];
 
-- 
1.7.1



More information about the ffmpeg-devel mailing list