[FFmpeg-devel] [PATCH 2/3] mpegvideo_parser: parse the output picture number
Jan Ekström
jeebjp at gmail.com
Sun Feb 11 16:37:51 EET 2018
From: Masaki Tanaka <maki.rxrz at gmail.com>
Utilizes the temporal_reference field from the picture header.
---
libavcodec/mpegvideo_parser.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavcodec/mpegvideo_parser.c b/libavcodec/mpegvideo_parser.c
index 3406346a8b..4f554b684e 100644
--- a/libavcodec/mpegvideo_parser.c
+++ b/libavcodec/mpegvideo_parser.c
@@ -60,6 +60,7 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s,
switch(start_code) {
case PICTURE_START_CODE:
if (bytes_left >= 2) {
+ s->output_picture_number = (buf[0] << 2) | (buf[1] >> 6);
s->pict_type = (buf[1] >> 3) & 7;
if (bytes_left >= 4)
vbv_delay = ((buf[1] & 0x07) << 13) | (buf[2] << 5) | (buf[3] >> 3);
--
2.14.3
More information about the ffmpeg-devel
mailing list