aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2017-03-27 09:56:38 -0400
committerRonald S. Bultje <rsbultje@gmail.com>2017-03-28 18:04:27 -0400
commitbddabfaab65808e40605181d579ffcd85bfe4c26 (patch)
treeb13bd7ed5560f3de92e4441fe97615f2f8dc9e09 /libavcodec
parent8c2aa45d4a99dc0d9990dfb56782487006f718c3 (diff)
downloadffmpeg-bddabfaab65808e40605181d579ffcd85bfe4c26.tar.gz
hevc: initialize no_rasl_output_flag in hevc_frame_start().
This prevents a race condition in files with multiple slices per frame.
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/hevcdec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c
index 98ed2a022b..ef21595c44 100644
--- a/libavcodec/hevcdec.c
+++ b/libavcodec/hevcdec.c
@@ -826,8 +826,6 @@ static int hls_slice_header(HEVCContext *s)
s->HEVClc->tu.cu_qp_offset_cb = 0;
s->HEVClc->tu.cu_qp_offset_cr = 0;
- s->no_rasl_output_flag = IS_IDR(s) || IS_BLA(s) || (s->nal_unit_type == HEVC_NAL_CRA_NUT && s->last_eos);
-
return 0;
}
@@ -2677,6 +2675,8 @@ static int hevc_frame_start(HEVCContext *s)
s->is_decoded = 0;
s->first_nal_type = s->nal_unit_type;
+ s->no_rasl_output_flag = IS_IDR(s) || IS_BLA(s) || (s->nal_unit_type == HEVC_NAL_CRA_NUT && s->last_eos);
+
if (s->ps.pps->tiles_enabled_flag)
lc->end_of_tiles_x = s->ps.pps->column_width[0] << s->ps.sps->log2_ctb_size;