summaryrefslogtreecommitdiff
path: root/libavcodec/mpegvideo_parser.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2023-05-05 15:45:42 +0200
committerAnton Khirnov <anton@khirnov.net>2023-05-15 10:31:55 +0200
commite930b834a928546f9cbc937f6633709053448232 (patch)
treeb6490fcbb8d5dbc7e8d2f1142754e4268071e8ae /libavcodec/mpegvideo_parser.c
parent70433abf7fbc978b5fa0d06951d61ac18ac335f8 (diff)
downloadffmpeg-e930b834a928546f9cbc937f6633709053448232.tar.gz
lavf: use AV_CODEC_PROP_FIELDS where appropriate
H.264 and mpeg12 parsers need to be adjusted at the same time to stop using the value of AVCodecContext.ticks_per_frame, because it is not set correctly unless the codec has been opened. Previously this would result in both the parser and lavf seeing the same incorrect value, which would cancel out. Updating lavf and not the parsers would result in correct value in lavf, but the wrong one in parsers, which would break some tests.
Diffstat (limited to 'libavcodec/mpegvideo_parser.c')
-rw-r--r--libavcodec/mpegvideo_parser.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mpegvideo_parser.c b/libavcodec/mpegvideo_parser.c
index 8e7e88ff25..08e5316960 100644
--- a/libavcodec/mpegvideo_parser.c
+++ b/libavcodec/mpegvideo_parser.c
@@ -129,6 +129,7 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s,
s->pict_type = (buf[1] >> 3) & 7;
if (bytes_left >= 4)
vbv_delay = ((buf[1] & 0x07) << 13) | (buf[2] << 5) | (buf[3] >> 3);
+ s->repeat_pict = 1;
}
break;
case SEQ_START_CODE:
@@ -186,7 +187,6 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s,
progressive_frame = buf[4] & (1 << 7);
/* check if we must repeat the frame */
- s->repeat_pict = 1;
if (repeat_first_field) {
if (pc->progressive_sequence) {
if (top_field_first)