[FFmpeg-devel] [PATCH 2/5] avcodec/hevcdec: use ff_hevc_uninit_parameter_sets()

James Almer jamrial at gmail.com
Sat Jan 20 23:12:50 EET 2018


Signed-off-by: James Almer <jamrial at gmail.com>
---
 libavcodec/hevcdec.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c
index 4bfae8c12b..98a96defb7 100644
--- a/libavcodec/hevcdec.c
+++ b/libavcodec/hevcdec.c
@@ -3277,15 +3277,7 @@ static av_cold int hevc_decode_free(AVCodecContext *avctx)
         av_frame_free(&s->DPB[i].frame);
     }
 
-    for (i = 0; i < FF_ARRAY_ELEMS(s->ps.vps_list); i++)
-        av_buffer_unref(&s->ps.vps_list[i]);
-    for (i = 0; i < FF_ARRAY_ELEMS(s->ps.sps_list); i++)
-        av_buffer_unref(&s->ps.sps_list[i]);
-    for (i = 0; i < FF_ARRAY_ELEMS(s->ps.pps_list); i++)
-        av_buffer_unref(&s->ps.pps_list[i]);
-    s->ps.sps = NULL;
-    s->ps.pps = NULL;
-    s->ps.vps = NULL;
+    ff_hevc_uninit_parameter_sets(&s->ps);
 
     av_freep(&s->sh.entry_point_offset);
     av_freep(&s->sh.offset);
-- 
2.15.0



More information about the ffmpeg-devel mailing list