summaryrefslogtreecommitdiff
path: root/libavcodec/h264_slice.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-02-14 23:45:01 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2017-02-15 00:19:50 +0100
commit6a37abc59af4d87d4c55f7d812ac62d4d6a7464b (patch)
tree765f0197449375f36b353d91b1a8af19eca5df88 /libavcodec/h264_slice.c
parent5fe2b437023f46394dfd4a4c991aa4a3ac3d8e72 (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_slice.c')
-rw-r--r--libavcodec/h264_slice.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index 91a3b2524a..a703853872 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -1131,7 +1131,7 @@ static int h264_export_frame_props(H264Context *h)
/* Prioritize picture timing SEI information over used
* decoding process if it exists. */
- if (sps->pic_struct_present_flag) {
+ if (sps->pic_struct_present_flag && h->sei.picture_timing.present) {
H264SEIPictureTiming *pt = &h->sei.picture_timing;
switch (pt->pic_struct) {
case SEI_PIC_STRUCT_FRAME:
@@ -1176,7 +1176,7 @@ static int h264_export_frame_props(H264Context *h)
/* Derive top_field_first from field pocs. */
cur->f->top_field_first = cur->field_poc[0] < cur->field_poc[1];
} else {
- if (sps->pic_struct_present_flag) {
+ if (sps->pic_struct_present_flag && h->sei.picture_timing.present) {
/* Use picture timing SEI information. Even if it is a
* information of a past frame, better than nothing. */
if (h->sei.picture_timing.pic_struct == SEI_PIC_STRUCT_TOP_BOTTOM ||