summaryrefslogtreecommitdiff
path: root/libavcodec/h264_slice.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2017-11-08 14:15:16 -0300
committerJames Almer <jamrial@gmail.com>2017-11-08 14:23:48 -0300
commitbc987cf91dd9975b0949bb5f91b9f266ca53e0ff (patch)
tree576c2374596c851ce3c45a04d52466e7acf3198e /libavcodec/h264_slice.c
parent5fd6fa0ca7f32d800a6044d28fb33a88e8de7283 (diff)
parent45c4bf3df03ef53ae61fa1473424d4ae024f22e4 (diff)
Merge commit '45c4bf3df03ef53ae61fa1473424d4ae024f22e4'
* commit '45c4bf3df03ef53ae61fa1473424d4ae024f22e4': h264dec: track the last seen value of x264_build Merged-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/h264_slice.c')
-rw-r--r--libavcodec/h264_slice.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index 35dcabd611..94a1547ad6 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -399,12 +399,12 @@ int ff_h264_update_thread_context(AVCodecContext *dst,
h->enable_er = h1->enable_er;
h->workaround_bugs = h1->workaround_bugs;
+ h->x264_build = h1->x264_build;
h->droppable = h1->droppable;
// extradata/NAL handling
h->is_avc = h1->is_avc;
h->nal_length_size = h1->nal_length_size;
- h->sei.unregistered.x264_build = h1->sei.unregistered.x264_build;
memcpy(&h->poc, &h1->poc, sizeof(h->poc));
@@ -545,6 +545,9 @@ static int h264_frame_start(H264Context *h)
h->mb_aff_frame = h->ps.sps->mb_aff && (h->picture_structure == PICT_FRAME);
+ if (h->sei.unregistered.x264_build >= 0)
+ h->x264_build = h->sei.unregistered.x264_build;
+
assert(h->cur_pic_ptr->long_ref == 0);
return 0;
@@ -912,7 +915,7 @@ static int h264_slice_header_init(H264Context *h)
if (sps->timing_info_present_flag) {
int64_t den = sps->time_scale;
- if (h->sei.unregistered.x264_build < 44U)
+ if (h->x264_build < 44U)
den *= 2;
av_reduce(&h->avctx->framerate.den, &h->avctx->framerate.num,
sps->num_units_in_tick * h->avctx->ticks_per_frame, den, 1 << 30);