mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-10-16 13:51:37 +08:00
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.
This commit is contained in:
@@ -481,6 +481,15 @@ static inline int parse_nal_units(AVCodecParserContext *s,
|
||||
}
|
||||
}
|
||||
|
||||
if (p->sei.picture_timing.present) {
|
||||
ret = ff_h264_sei_process_picture_timing(&p->sei.picture_timing,
|
||||
sps, avctx);
|
||||
if (ret < 0) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Error processing the picture timing SEI\n");
|
||||
p->sei.picture_timing.present = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (sps->pic_struct_present_flag && p->sei.picture_timing.present) {
|
||||
switch (p->sei.picture_timing.pic_struct) {
|
||||
case H264_SEI_PIC_STRUCT_TOP_FIELD:
|
||||
|
Reference in New Issue
Block a user