[FFmpeg-devel] [PATCH 7/7] avcodec/options: Remove always-true check

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Fri Apr 2 00:26:12 EEST 2021


Every codec has a name.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
 libavcodec/options.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/options.c b/libavcodec/options.c
index 58c7ce8d62..b8d4a9faf6 100644
--- a/libavcodec/options.c
+++ b/libavcodec/options.c
@@ -39,7 +39,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
 static const char* context_to_name(void* ptr) {
     AVCodecContext *avc= ptr;
 
-    if(avc && avc->codec && avc->codec->name)
+    if (avc && avc->codec)
         return avc->codec->name;
     else
         return "NULL";
-- 
2.27.0



More information about the ffmpeg-devel mailing list