Commit 2a857bc8 authored by Felix Paul Kühne's avatar Felix Paul Kühne

videotoolbox: fix memory leaks

parent fb204242
...@@ -601,7 +601,9 @@ static void StopVideoToolbox(decoder_t *p_dec) ...@@ -601,7 +601,9 @@ static void StopVideoToolbox(decoder_t *p_dec)
decoder_sys_t *p_sys = p_dec->p_sys; decoder_sys_t *p_sys = p_dec->p_sys;
if (p_sys->b_started) { if (p_sys->b_started) {
CFRelease(p_sys->outputTimeStamps);
p_sys->outputTimeStamps = nil; p_sys->outputTimeStamps = nil;
CFRelease(p_sys->outputFrames);
p_sys->outputFrames = nil; p_sys->outputFrames = nil;
p_sys->b_started = false; p_sys->b_started = false;
...@@ -1055,6 +1057,7 @@ skip: ...@@ -1055,6 +1057,7 @@ skip:
* otherwise we would leak it */ * otherwise we would leak it */
if (p_pic->p_sys->pixelBuffer != nil) { if (p_pic->p_sys->pixelBuffer != nil) {
CFRelease(p_pic->p_sys->pixelBuffer); CFRelease(p_pic->p_sys->pixelBuffer);
p_pic->p_sys->pixelBuffer = nil;
} }
p_pic->p_sys->pixelBuffer = CFBridgingRetain(imageBufferObject); p_pic->p_sys->pixelBuffer = CFBridgingRetain(imageBufferObject);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment