diff mbox series

[FFmpeg-devel,05/15] avcodec/mpeg12dec: Remove redundant check

Message ID GV1P250MB0737F4865D88560CAA30924A8F032@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit 1a5452655aeebe832e84561769e81e2c3062a8a9
Headers show
Series [FFmpeg-devel,01/15] avcodec/mpegvideo_enc: Don't update current_picture unnecessarily | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt April 5, 2024, 12:41 p.m. UTC
This code only gets executed for the first field.

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

Patch

diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index fb8bba3287..83ff40d237 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
@@ -1301,7 +1301,7 @@  static int mpeg_field_start(MpegEncContext *s, const uint8_t *buf, int buf_size)
 
         if (s->picture_structure != PICT_FRAME) {
             s->current_picture_ptr->f->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST *
-                ((s->picture_structure == PICT_TOP_FIELD) == s->first_field);
+                                                (s->picture_structure == PICT_TOP_FIELD);
 
             for (int i = 0; i < 4; i++) {
                 if (s->picture_structure == PICT_BOTTOM_FIELD) {