mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
avcodec/hevc_ps: add a function to uninitialize parameter set buffers
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit 9462b2b820
)
This commit is contained in:
parent
dd93df46a6
commit
64f0fd5998
@ -1709,6 +1709,22 @@ err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
void ff_hevc_ps_uninit(HEVCParamSets *ps)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < FF_ARRAY_ELEMS(ps->vps_list); i++)
|
||||
av_buffer_unref(&ps->vps_list[i]);
|
||||
for (i = 0; i < FF_ARRAY_ELEMS(ps->sps_list); i++)
|
||||
av_buffer_unref(&ps->sps_list[i]);
|
||||
for (i = 0; i < FF_ARRAY_ELEMS(ps->pps_list); i++)
|
||||
av_buffer_unref(&ps->pps_list[i]);
|
||||
|
||||
ps->sps = NULL;
|
||||
ps->pps = NULL;
|
||||
ps->vps = NULL;
|
||||
}
|
||||
|
||||
int ff_hevc_compute_poc(const HEVCSPS *sps, int pocTid0, int poc_lsb, int nal_unit_type)
|
||||
{
|
||||
int max_poc_lsb = 1 << sps->log2_max_poc_lsb;
|
||||
|
@ -421,6 +421,8 @@ int ff_hevc_decode_nal_sps(GetBitContext *gb, AVCodecContext *avctx,
|
||||
int ff_hevc_decode_nal_pps(GetBitContext *gb, AVCodecContext *avctx,
|
||||
HEVCParamSets *ps);
|
||||
|
||||
void ff_hevc_ps_uninit(HEVCParamSets *ps);
|
||||
|
||||
int ff_hevc_decode_short_term_rps(GetBitContext *gb, AVCodecContext *avctx,
|
||||
ShortTermRPS *rps, const HEVCSPS *sps, int is_slice_header);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user