diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-02-15 11:34:52 -0500 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2017-02-28 10:32:50 -0500 |
commit | d7b2bb5391bf55e8f9421bff7feb4c1fddfac4bf (patch) | |
tree | 2b9c3aafaab1eacac14fa98759ba5c89178d060f /libavcodec/h264_parser.c | |
parent | 21cca00dfeaec08ca93cf94ed33f4311cf1d8c84 (diff) | |
download | ffmpeg-d7b2bb5391bf55e8f9421bff7feb4c1fddfac4bf.tar.gz |
h264_sei: Check actual presence of picture timing SEI message
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Diffstat (limited to 'libavcodec/h264_parser.c')
-rw-r--r-- | libavcodec/h264_parser.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c index 6de37c0b55..22153bd4e0 100644 --- a/libavcodec/h264_parser.c +++ b/libavcodec/h264_parser.c @@ -402,7 +402,7 @@ static inline int parse_nal_units(AVCodecParserContext *s, } } - if (sps->pic_struct_present_flag) { + if (sps->pic_struct_present_flag && p->sei.picture_timing.present) { switch (p->sei.picture_timing.pic_struct) { case SEI_PIC_STRUCT_TOP_FIELD: case SEI_PIC_STRUCT_BOTTOM_FIELD: @@ -433,7 +433,7 @@ static inline int parse_nal_units(AVCodecParserContext *s, if (p->picture_structure == PICT_FRAME) { s->picture_structure = AV_PICTURE_STRUCTURE_FRAME; - if (sps->pic_struct_present_flag) { + if (sps->pic_struct_present_flag && p->sei.picture_timing.present) { switch (p->sei.picture_timing.pic_struct) { case SEI_PIC_STRUCT_TOP_BOTTOM: case SEI_PIC_STRUCT_TOP_BOTTOM_TOP: |