mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-06 23:48:53 +00:00
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:
parent
1dd3ef24b1
commit
b0543d6ea5
1 changed files with 6 additions and 0 deletions
|
@ -545,6 +545,9 @@ gst_vtdec_create_session (GstVtdec * vtdec, GstVideoFormat format,
|
||||||
videoDecoderSpecification, output_image_buffer_attrs, &callback,
|
videoDecoderSpecification, output_image_buffer_attrs, &callback,
|
||||||
&vtdec->session);
|
&vtdec->session);
|
||||||
|
|
||||||
|
if (videoDecoderSpecification)
|
||||||
|
CFRelease (videoDecoderSpecification);
|
||||||
|
|
||||||
CFRelease (output_image_buffer_attrs);
|
CFRelease (output_image_buffer_attrs);
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
|
@ -607,6 +610,9 @@ create_format_description_from_codec_data (GstVtdec * vtdec,
|
||||||
cm_format, vtdec->video_info.width, vtdec->video_info.height,
|
cm_format, vtdec->video_info.width, vtdec->video_info.height,
|
||||||
extensions, &fmt_desc);
|
extensions, &fmt_desc);
|
||||||
|
|
||||||
|
if (extensions)
|
||||||
|
CFRelease (extensions);
|
||||||
|
|
||||||
if (status == noErr)
|
if (status == noErr)
|
||||||
return fmt_desc;
|
return fmt_desc;
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue