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)?

Greetings Harald

-
Harald Schlangmann
Antwerpener Str. 52, 50672 Köln, Germany
+49 151 2265 4439
[email protected]
www.gps-laptimer.de

On 05.04.2014, at 23:01, wm4 <[email protected]> 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
> [email protected]
> http://ffmpeg.org/mailman/listinfo/libav-user

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to