diff mbox series

[FFmpeg-devel,16/30] avcodec/mpegvideo_enc: Move updating mb_info to its only user

Message ID AM7PR03MB6660C2F44129F0FB1E5F86668F7E9@AM7PR03MB6660.eurprd03.prod.outlook.com
State Accepted
Commit 7a2f7283020a5723cf11b4fec6ceaa3470329601
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
It is a H.263 option.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
There is unfortunately another call to update_mb_info()
that is not immediately followed (or preceded) by some ff_h263_*
function; otherwise one could have easily moved this to
a h263-specific place.

 libavcodec/mpegvideo_enc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 79f67ca01b..0c98629603 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -2906,8 +2906,6 @@  static int encode_thread(AVCodecContext *c, void *arg){
                         }
                     }
 
-                    update_mb_info(s, 1);
-
                     switch(s->codec_id){
                     case AV_CODEC_ID_MPEG4:
                         if (CONFIG_MPEG4_ENCODER) {
@@ -2924,8 +2922,10 @@  static int encode_thread(AVCodecContext *c, void *arg){
                     break;
                     case AV_CODEC_ID_H263:
                     case AV_CODEC_ID_H263P:
-                        if (CONFIG_H263_ENCODER)
+                        if (CONFIG_H263_ENCODER) {
+                            update_mb_info(s, 1);
                             ff_h263_encode_gob_header(s, mb_y);
+                        }
                     break;
                     }