diff options
author | Anton Khirnov <anton@khirnov.net> | 2017-05-19 10:44:59 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2020-04-10 15:52:22 +0200 |
commit | ec7f33a38e341807c0ff9530e4dc7e175a86f437 (patch) | |
tree | ecb68bac55d7bfd820da689579ccf4cd2b29f3f8 /libavcodec/h264_sei.h | |
parent | 1e9615c5d4d1697816037057133b20da4fd9e57b (diff) |
h264_sei: parse the picture timing SEIs correctly
Those SEIs refer to the currently active SPS. However, since the SEI
NALUs precede the coded picture data in the bitstream, the active SPS is
in general not known when we are decoding the SEI.
Therefore, store the content of the picture timing SEIs and actually
parse it when the active SPS is known.
Diffstat (limited to 'libavcodec/h264_sei.h')
-rw-r--r-- | libavcodec/h264_sei.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libavcodec/h264_sei.h b/libavcodec/h264_sei.h index a75c3aa175..f07a5055c3 100644 --- a/libavcodec/h264_sei.h +++ b/libavcodec/h264_sei.h @@ -20,6 +20,7 @@ #define AVCODEC_H264_SEI_H #include "get_bits.h" +#include "h264_ps.h" /** * SEI message types @@ -79,6 +80,10 @@ typedef struct H264SEITimeCode { } H264SEITimeCode; typedef struct H264SEIPictureTiming { + // maximum size of pic_timing according to the spec should be 274 bits + uint8_t payload[40]; + int payload_size_bits; + int present; H264_SEI_PicStructType pic_struct; @@ -202,4 +207,10 @@ void ff_h264_sei_uninit(H264SEIContext *h); */ const char *ff_h264_sei_stereo_mode(const H264SEIFramePacking *h); +/** + * Parse the contents of a picture timing message given an active SPS. + */ +int ff_h264_sei_process_picture_timing(H264SEIPictureTiming *h, const SPS *sps, + void *logctx); + #endif /* AVCODEC_H264_SEI_H */ |