[FFmpeg-devel] [PATCH 05/15] avcodec/mpeg12dec: Remove redundant check
Andreas Rheinhardt
andreas.rheinhardt at outlook.com
Fri Apr 5 15:41:28 EEST 2024
This code only gets executed for the first field.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
libavcodec/mpeg12dec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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) {
--
2.40.1
More information about the ffmpeg-devel
mailing list