diff mbox series

[FFmpeg-devel] avcodec/utils: remove extra brackets

Message ID 1580548333-146351-1-git-send-email-leozhang@qiyi.com
State Accepted
Headers show
Series [FFmpeg-devel] avcodec/utils: remove extra brackets
Related show

Checks

Context Check Description
andriy/ffmpeg-patchwork pending
andriy/ffmpeg-patchwork success Applied patch
andriy/ffmpeg-patchwork success Configure finished
andriy/ffmpeg-patchwork success Make finished
andriy/ffmpeg-patchwork success Make fate finished

Commit Message

leozhang Feb. 1, 2020, 9:12 a.m. UTC
Signed-off-by: leozhang <leozhang@qiyi.com>
---
 libavcodec/utils.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Michael Niedermayer Feb. 1, 2020, 5:32 p.m. UTC | #1
On Sat, Feb 01, 2020 at 05:12:13PM +0800, leozhang wrote:
> Signed-off-by: leozhang <leozhang@qiyi.com>
> ---
>  libavcodec/utils.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

will apply

thx

[...]
diff mbox series

Patch

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index ab48754..c685b9c 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -556,11 +556,11 @@  int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code
     if (avcodec_is_open(avctx))
         return 0;
 
-    if ((!codec && !avctx->codec)) {
+    if (!codec && !avctx->codec) {
         av_log(avctx, AV_LOG_ERROR, "No codec provided to avcodec_open2()\n");
         return AVERROR(EINVAL);
     }
-    if ((codec && avctx->codec && codec != avctx->codec)) {
+    if (codec && avctx->codec && codec != avctx->codec) {
         av_log(avctx, AV_LOG_ERROR, "This AVCodecContext was allocated for %s, "
                                     "but %s passed to avcodec_open2()\n", avctx->codec->name, codec->name);
         return AVERROR(EINVAL);