I'll start from the beginning to see if we can find the problem: I do the register all; I do a find_decoder (which is currently looking for "CODEC_ID_H264"); if that's successful, I allocate the context (using alloc_context3); I then do an avcodec_open2 with arguments of my context, my codec, and NULL for the dictionary; if this succeeds, I allocate the frame; next, I initialize a packet and set the packets data to the buffer I received which contains the H264 video; if that all works, i do a decode_video2.<div>
<br></div><div>The return is a -1 as i save it to a unique variable and print the result immediately; it also states that whole "no frame!" prior to my printout of the result.</div><div><br></div><div>I feel like it's tied into either the AVCodecContext or the AVPacket (something I'm not populating in the packet besides supplying the buffer); but that's just a guess at this point.</div>
<div><br></div><div>Thanks for taking time to look at this problem.</div><div><br></div><div>-Neil</div><div><br></div><div>P.S. If it matters, I'm using Live555 (because I need direct access to some of the RTP related data) to pull down my RTSP stream and passing along the buffer it returns.<br>
<div><br><div class="gmail_quote">On Wed, Dec 28, 2011 at 4:39 AM, Alex Cohn <span dir="ltr"><<a href="mailto:alexcohn@netvision.net.il">alexcohn@netvision.net.il</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Wed, Dec 28, 2011 at 01:19, Neil Menne <<a href="mailto:nhmenne42@students.tntech.edu">nhmenne42@students.tntech.edu</a>> wrote:<br>
> How do I pass a raw buffer into this function?<br>
><br>
> I find the appropriate codec and codec context, allocate the AVFrame, and<br>
> initialize the packet. When I try and set the packet's data to the buffer:<br>
> AVPacket packet;<br>
> av_init_packet(&packet);<br>
> packet.data = buf;<br>
><br>
> where buf is the buffer received; I'm getting an error that seems to be<br>
> unrelated. It says "no frame!" and returns -1.<br>
<br>
</div>Are you sure you receive -1 from the code above? maybe, some important<br>
line of code is missing in your post?<br>
-Alex<br>
<div class="im"><br>
> If it helps, my AVFrame is initialized with:<br>
> codecFrame = avcodec_alloc_frame();<br>
><br>
> -Neil<br>
</div>_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
</blockquote></div><br></div></div>