summaryrefslogtreecommitdiff
path: root/libavcodec/hevc.c
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2015-09-12 21:50:24 +0200
committerHendrik Leppkes <h.leppkes@gmail.com>2015-09-20 00:17:32 +0200
commit0118158efa8e45761f9f65a3bb74f33907bd2aec (patch)
treefc412dc6628e781dd9729b9359f2d133b90ffc9a /libavcodec/hevc.c
parent11b563ed8f7c1a9183ba77680d9040fc384733d5 (diff)
hevc: properly handle no_rasl_output_flag when removing pictures from the DPB
Fixes ticket #4185. Reviewed-By: Mickael Raulet <Mickael.Raulet@insa-rennes.fr> Signed-off-by: Hendrik Leppkes <h.leppkes@gmail.com>
Diffstat (limited to 'libavcodec/hevc.c')
-rw-r--r--libavcodec/hevc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c
index 8d4db22c8c..e45f4a4113 100644
--- a/libavcodec/hevc.c
+++ b/libavcodec/hevc.c
@@ -809,6 +809,8 @@ 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;
}
@@ -3135,6 +3137,7 @@ static int hevc_update_thread_context(AVCodecContext *dst,
s->pocTid0 = s0->pocTid0;
s->max_ra = s0->max_ra;
s->eos = s0->eos;
+ s->no_rasl_output_flag = s0->no_rasl_output_flag;
s->is_nalff = s0->is_nalff;
s->nal_length_size = s0->nal_length_size;
@@ -3239,6 +3242,7 @@ static av_cold int hevc_decode_init(AVCodecContext *avctx)
s->enable_parallel_tiles = 0;
s->picture_struct = 0;
+ s->eos = 1;
if(avctx->active_thread_type & FF_THREAD_SLICE)
s->threads_number = avctx->thread_count;
@@ -3280,6 +3284,7 @@ static void hevc_decode_flush(AVCodecContext *avctx)
HEVCContext *s = avctx->priv_data;
ff_hevc_flush_dpb(s);
s->max_ra = INT_MAX;
+ s->eos = 1;
}
#define OFFSET(x) offsetof(HEVCContext, x)