[FFmpeg-devel] [PATCH 14/14] avcodec/mpegvideo_enc: Remove impossible branch

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Wed Dec 22 05:30:03 EET 2021


Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
 libavcodec/mpegvideo_enc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 4ee7666c78..79f67ca01b 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -3596,9 +3596,7 @@ static int encode_picture(MpegEncContext *s, int picture_number)
                                         s->p_field_mv_table[i][j], s->f_code, CANDIDATE_MB_TYPE_INTER_I, !!s->intra_penalty);
                 }
             }
-        }
-
-        if(s->pict_type==AV_PICTURE_TYPE_B){
+        } else if (s->pict_type == AV_PICTURE_TYPE_B) {
             int a, b;
 
             a = ff_get_best_fcode(s, s->b_forw_mv_table, CANDIDATE_MB_TYPE_FORWARD);
-- 
2.32.0



More information about the ffmpeg-devel mailing list