[FFmpeg-cvslog] avcodec/mpegvideo: Avoid needlessly calling function

Andreas Rheinhardt git at videolan.org
Tue Jan 4 18:21:00 EET 2022


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Thu Dec 23 03:37:12 2021 +0100| [22ef01f5e142ffc38d4365b284cba5747a2d9982] | committer: Andreas Rheinhardt

avcodec/mpegvideo: Avoid needlessly calling function

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 at outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=22ef01f5e142ffc38d4365b284cba5747a2d9982
---

 libavcodec/mpegvideo.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index a0d05f8b46..5e87a41f52 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 {



More information about the ffmpeg-cvslog mailing list