diff mbox series

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

Message ID HE1PR0301MB21540720552E2C5DB9CB05758F7B9@HE1PR0301MB2154.eurprd03.prod.outlook.com
State Accepted
Commit 9b6ffcf0fd61b61e53591c0ce215de2ce35a6982
Headers show
Series [FFmpeg-devel,1/7] avformat/utils: Check allocations for failure | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Andreas Rheinhardt April 1, 2021, 9:26 p.m. UTC
Every codec has a name.

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

Patch

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