[Libav-user] avcodec_decode_video2

Neil Menne nhmenne42 at students.tntech.edu
Wed Dec 28 00:19:11 CET 2011

How do I pass a raw buffer into this function?

I find the appropriate codec and codec context, allocate the AVFrame, and
initialize the packet. When I try and set the packet's data to the buffer:
AVPacket packet;
packet.data = buf;

where buf is the buffer received; I'm getting an error that seems to be
unrelated. It says "no frame!" and returns -1.

If it helps, my AVFrame is initialized with:
codecFrame = avcodec_alloc_frame();

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20111227/a51150d9/attachment.html>

More information about the Libav-user mailing list