diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-02-15 01:45:01 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-02-15 02:19:50 +0300 |
commit | 6a37abc59af4d87d4c55f7d812ac62d4d6a7464b (patch) | |
tree | 765f0197449375f36b353d91b1a8af19eca5df88 /libavcodec/h264_parser.c | |
parent | 5fe2b437023f46394dfd4a4c991aa4a3ac3d8e72 (diff) |
avcodec/h264_sei: Check actual presence of SEI picture timing instead of implying it
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
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 bca00717c4..bc35a6146e 100644 --- a/libavcodec/h264_parser.c +++ b/libavcodec/h264_parser.c @@ -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: |