[FFmpeg-cvslog] avcodec/hevcdec: use ff_hevc_uninit_parameter_sets()

James Almer git at videolan.org
Wed Jan 31 03:11:17 EET 2018


ffmpeg | branch: release/3.4 | James Almer <jamrial at gmail.com> | Sat Jan 20 16:54:51 2018 -0300| [d7d5a3379dfe35422b894d7ce1039c4cff0581f6] | committer: James Almer

avcodec/hevcdec: use ff_hevc_uninit_parameter_sets()

Reviewed-by: Michael Niedermayer <michael at niedermayer.cc>
Signed-off-by: James Almer <jamrial at gmail.com>
(cherry picked from commit 1f0cf1b2f4ef6304c343d53508193ac4b5d9c1d2)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d7d5a3379dfe35422b894d7ce1039c4cff0581f6
---

 libavcodec/hevcdec.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c
index 2e4add2ae3..67ac9ab262 100644
--- a/libavcodec/hevcdec.c
+++ b/libavcodec/hevcdec.c
@@ -3215,15 +3215,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_ps_uninit(&s->ps);
 
     av_freep(&s->sh.entry_point_offset);
     av_freep(&s->sh.offset);



More information about the ffmpeg-cvslog mailing list