mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +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,
|
||||
&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
|
||||
|
|
Loading…
Reference in a new issue