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

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


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

avcodec/hevc_parser: 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 2159d4bbc3e69d04242e87bac13ebea8b942d94d)

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

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

diff --git a/libavcodec/hevc_parser.c b/libavcodec/hevc_parser.c
index dc63c6b954..3bef236983 100644
--- a/libavcodec/hevc_parser.c
+++ b/libavcodec/hevc_parser.c
@@ -359,17 +359,8 @@ static int hevc_split(AVCodecContext *avctx, const uint8_t *buf, int buf_size)
 static void hevc_parser_close(AVCodecParserContext *s)
 {
     HEVCParserContext *ctx = s->priv_data;
-    int i;
-
-    for (i = 0; i < FF_ARRAY_ELEMS(ctx->ps.vps_list); i++)
-        av_buffer_unref(&ctx->ps.vps_list[i]);
-    for (i = 0; i < FF_ARRAY_ELEMS(ctx->ps.sps_list); i++)
-        av_buffer_unref(&ctx->ps.sps_list[i]);
-    for (i = 0; i < FF_ARRAY_ELEMS(ctx->ps.pps_list); i++)
-        av_buffer_unref(&ctx->ps.pps_list[i]);
-
-    ctx->ps.sps = NULL;
 
+    ff_hevc_ps_uninit(&ctx->ps);
     ff_h2645_packet_uninit(&ctx->pkt);
     ff_hevc_reset_sei(&ctx->sei);
 



More information about the ffmpeg-cvslog mailing list