diff options
Diffstat (limited to 'libavcodec/h264_ps.c')
-rw-r--r-- | libavcodec/h264_ps.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libavcodec/h264_ps.c b/libavcodec/h264_ps.c index 521f560bc1..fb05b05fac 100644 --- a/libavcodec/h264_ps.c +++ b/libavcodec/h264_ps.c @@ -298,6 +298,23 @@ static void decode_scaling_matrices(GetBitContext *gb, SPS *sps, } } +void ff_h264_ps_uninit(H264ParamSets *ps) +{ + int i; + + for (i = 0; i < MAX_SPS_COUNT; i++) + av_buffer_unref(&ps->sps_list[i]); + + for (i = 0; i < MAX_PPS_COUNT; i++) + av_buffer_unref(&ps->pps_list[i]); + + av_buffer_unref(&ps->sps_ref); + av_buffer_unref(&ps->pps_ref); + + ps->pps = NULL; + ps->sps = NULL; +} + int ff_h264_decode_seq_parameter_set(GetBitContext *gb, AVCodecContext *avctx, H264ParamSets *ps, int ignore_truncation) { |