diff mbox

[FFmpeg-devel] hevc: initialize no_rasl_output_flag in hevc_frame_start().

Message ID 1490623006-41621-1-git-send-email-rsbultje@gmail.com
State Accepted
Headers show

Commit Message

Ronald S. Bultje March 27, 2017, 1:56 p.m. UTC
This prevents a race condition in files with multiple slices per frame.
---
 libavcodec/hevc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c
index 505249e..bfe2386 100644
--- a/libavcodec/hevc.c
+++ b/libavcodec/hevc.c
@@ -825,8 +825,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 == NAL_CRA_NUT && s->last_eos);
-
     return 0;
 }
 
@@ -2676,6 +2674,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 == 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;