Commit 458e7c94 authored by Gildas Cocherel's avatar Gildas Cocherel Committed by Anton Khirnov

hevc: implement pic_output_flag handling

Sample-Id: OPFLAG_B_Qualcomm_1.bit, OPFLAG_C_Qualcomm_1.bit
Signed-off-by: 's avatarVittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: 's avatarAnton Khirnov <anton@khirnov.net>
parent f43789b7
......@@ -546,6 +546,8 @@ static int hls_slice_header(HEVCContext *s)
return AVERROR_INVALIDDATA;
}
// when flag is not present, picture is inferred to be output
sh->pic_output_flag = 1;
if (s->pps->output_flag_present_flag)
sh->pic_output_flag = get_bits1(gb);
......
......@@ -143,8 +143,12 @@ int ff_hevc_set_new_ref(HEVCContext *s, AVFrame **frame, int poc)
*frame = ref->frame;
s->ref = ref;
if (s->sh.pic_output_flag)
ref->flags = HEVC_FRAME_FLAG_OUTPUT | HEVC_FRAME_FLAG_SHORT_REF;
else
ref->flags = HEVC_FRAME_FLAG_SHORT_REF;
ref->poc = poc;
ref->flags = HEVC_FRAME_FLAG_OUTPUT | HEVC_FRAME_FLAG_SHORT_REF;
ref->sequence = s->seq_decode;
ref->window = s->sps->output_window;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment