On Fri, 09 Jan 2009 19:45:14 -0500, Bogdan Coanda  
<[email protected]> wrote:
> AVPacket *packet = (AVPacket*)av_mallocz(sizeof(AVPacket));
> av_new_packet(packet, streamFormatCtx->packet_size);

Don't allocate your own packet.  av_read_frame will overwrite it, and give  
you a memory leak.

> The problem at hand is that even if I try to give avcodec_decode_video  
> fresh
> pointers every time (currentFrame and packet), after avcodec_decode_video
> executes, *I always get the same pointers inside currentFrame->data*,  
> which
> esentially means I can't save any array of frames as they will all have  
> the
> same content.

See
http://lists.mplayerhq.hu/pipermail/libav-user/2008-December/001979.html
(with my correction:  
http://lists.mplayerhq.hu/pipermail/libav-user/2008-December/001980.html)
and the referenced message in that post.  (and other messages in those  
threads)

-- 
Michael Conrad
IntelliTree Solutions llc.
513-552-6362
[email protected]
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to