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

leozhang leozhang at qiyi.com
Sat Feb 1 11:12:13 EET 2020


Signed-off-by: leozhang <leozhang at qiyi.com>
---
 libavcodec/utils.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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);
-- 
1.8.3.1



More information about the ffmpeg-devel mailing list