Skip to content

Commit 211c39a

Browse files
committed
HEVC : valgrind fix : vps_list
1 parent 98de35e commit 211c39a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libavcodec/hevc_parser.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ static inline int parse_nal_units(AVCodecParserContext *s, AVCodecContext *avctx
187187
}
188188
if (h->sps != (HEVCSPS*)h->sps_list[h->pps->sps_id]->data) {
189189
h->sps = (HEVCSPS*)h->sps_list[h->pps->sps_id]->data;
190-
h->vps = h->vps_list[h->sps->vps_id];
190+
h->vps = (HEVCVPS*)h->vps_list[h->sps->vps_id]->data;
191191
}
192192

193193
if (!sh->first_slice_in_pic_flag) {
@@ -325,7 +325,7 @@ static void hevc_close(AVCodecParserContext *s)
325325
av_freep(&pc->buffer);
326326

327327
for (i = 0; i < FF_ARRAY_ELEMS(h->vps_list); i++)
328-
av_freep(&h->vps_list[i]);
328+
av_buffer_unref(&h->vps_list[i]);
329329
for (i = 0; i < FF_ARRAY_ELEMS(h->sps_list); i++)
330330
av_buffer_unref(&h->sps_list[i]);
331331
for (i = 0; i < FF_ARRAY_ELEMS(h->pps_list); i++)

0 commit comments

Comments
 (0)