diff mbox

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

Message ID 1557504354-27086-5-git-send-email-mypopydev@gmail.com
State Accepted
Commit 64e610b5f4b7c338713208a4dfa24a8f2eb728c8
Headers show

Commit Message

Jun Zhao May 10, 2019, 4:05 p.m. UTC
From: Jun Zhao <barryjzhao@tencent.com>

remove the redundant condition check for 'frame'

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

Comments

mypopy@gmail.com May 13, 2019, 1:31 a.m. UTC | #1
On Sat, May 11, 2019 at 12:06 AM Jun Zhao <mypopydev@gmail.com> wrote:
>
> From: Jun Zhao <barryjzhao@tencent.com>
>
> remove the redundant condition check for 'frame'
>
> Signed-off-by: Jun Zhao <barryjzhao@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
Pushed, Thanks
diff mbox

Patch

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];