diff mbox series

[FFmpeg-devel,23/30] avcodec/mpegvideo: Avoid needlessly calling function

Message ID AM7PR03MB66600393EAA06958D30EF8D88F7E9@AM7PR03MB6660.eurprd03.prod.outlook.com
State Accepted
Commit 22ef01f5e142ffc38d4365b284cba5747a2d9982
Headers show
Series [FFmpeg-devel,01/14] avcodec/mjpegenc: Use custom close function directly | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc fail Make fate failed

Commit Message

Andreas Rheinhardt Dec. 23, 2021, 9:13 a.m. UTC
The very first check in this if-else if-else if construct is
"if (s->encoding ||", i.e. in case of the WMV2 encoder the else
branches are never executed.

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

Patch

diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 4c3e0fa8bf..3a42e08a04 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -2122,8 +2122,7 @@  void mpv_reconstruct_mb_internal(MpegEncContext *s, int16_t block[12][64],
                         }
                     }
                 }//fi gray
-            }
-            else if (CONFIG_WMV2_DECODER || CONFIG_WMV2_ENCODER) {
+            } else if (CONFIG_WMV2_DECODER) {
                 ff_wmv2_add_mb(s, block, dest_y, dest_cb, dest_cr);
             }
         } else {