vtdec: memory leaks bugfix

release 'videoDecoderSpecification' variable in 'gst_vtdec_create_session' function.
release 'extensions' variable in 'create_format_description_from_codec_data' function.
This commit is contained in:
Roman Shpuntov 2019-10-31 15:14:21 +07:00 committed by Matthew Waters
parent 1dd3ef24b1
commit b0543d6ea5

View file

@ -545,6 +545,9 @@ gst_vtdec_create_session (GstVtdec * vtdec, GstVideoFormat format,
videoDecoderSpecification, output_image_buffer_attrs, &callback,
&vtdec->session);
if (videoDecoderSpecification)
CFRelease (videoDecoderSpecification);
CFRelease (output_image_buffer_attrs);
return status;
@ -607,6 +610,9 @@ create_format_description_from_codec_data (GstVtdec * vtdec,
cm_format, vtdec->video_info.width, vtdec->video_info.height,
extensions, &fmt_desc);
if (extensions)
CFRelease (extensions);
if (status == noErr)
return fmt_desc;
else