<div dir="ltr">Thanks! Will try it out.</div><br><div class="gmail_quote"><div dir="ltr">пт, 16 сент. 2016 г. в 13:56, Steve <<a href="mailto:musicspeedchanger@gmail.com">musicspeedchanger@gmail.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Timur Guseynov wrote<br>
> So I can write something like this and it would be ok?<br>
><br>
> AVCodecContext *codecContext;<br>
> AVPacket *packet;<br>
> AVFrame *frame;<br>
> // allocating codec context, getting packet<br>
> .................................<br>
> //<br>
> avcodec_send_packet(codecContext, packet);<br>
> while(avcodec_receive_frame(codecContext, frame) == 0)<br>
> {<br>
>       av_frame_unref(frame);<br>
> }<br>
<br>
No, that's where the doc you were referring to comes in, av_frame_unref is<br>
called for you. But you have to handle the packet, so:<br>
<br>
avcodec_send_packet(codecContext, packet);<br>
while(avcodec_receive_frame(codecContext, frame) == 0)<br>
{<br>
    ..<br>
}<br>
 av_packet_unref(packet);<br>
<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://libav-users.943685.n4.nabble.com/Libav-user-Decoding-encoding-api-tp4662664p4662679.html" rel="noreferrer" target="_blank">http://libav-users.943685.n4.nabble.com/Libav-user-Decoding-encoding-api-tp4662664p4662679.html</a><br>
Sent from the libav-users mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org" target="_blank">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" rel="noreferrer" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
</blockquote></div>