avcodec/h264_sei: Check actual presence of SEI picture timing instead of implying it

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer
2017-02-14 23:45:01 +01:00
parent 5fe2b43702
commit 6a37abc59a
4 changed files with 8 additions and 4 deletions

View File

@@ -471,7 +471,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:
@@ -502,7 +502,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: