[Libav-user] Memory Leaks?
harry at gps-laptimer.de
Sun Apr 6 00:06:12 CEST 2014
I’m unreferencing it when a frame has been completely read:
>> int frameFinished;
>> ret = avcodec_decode_video2 (videoSource->pVideoCodecCtx, videoSource->pVideoFrameRaw, &frameFinished, &packet);
>> if (ret>=0)
>> if (frameFinished)
>> av_frame_unref (videoSource->pVideoFrameRaw);
Unreferencing it before the avcodec_decode_video2 is most probably wrong (at least in the theoretical case the frame comes in more than 1 package)?
Antwerpener Str. 52, 50672 Köln, Germany
+49 151 2265 4439
Harry at gps-laptimer.de
On 05.04.2014, at 23:01, wm4 <nfxjfg at googlemail.com> wrote:
> Did you unref the frame before passing it to the decoder? In some
> versions of ffmpeg this is required, though it might be incorrect and
> cause memory corruption with some earlier versions of ffmpeg. Either
> way, it's probably an API usage error with AVFrame management.
> Libav-user mailing list
> Libav-user at ffmpeg.org
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4145 bytes
Desc: not available
More information about the Libav-user