[Libav-user] Decoding/encoding api
Timur Guseynov
s1.sam.1.93 at gmail.com
Fri Sep 16 13:58:04 EEST 2016
Thanks! Will try it out.
пт, 16 сент. 2016 г. в 13:56, Steve <musicspeedchanger at gmail.com>:
> Timur Guseynov wrote
> > So I can write something like this and it would be ok?
> >
> > AVCodecContext *codecContext;
> > AVPacket *packet;
> > AVFrame *frame;
> > // allocating codec context, getting packet
> > .................................
> > //
> > avcodec_send_packet(codecContext, packet);
> > while(avcodec_receive_frame(codecContext, frame) == 0)
> > {
> > av_frame_unref(frame);
> > }
>
> No, that's where the doc you were referring to comes in, av_frame_unref is
> called for you. But you have to handle the packet, so:
>
> avcodec_send_packet(codecContext, packet);
> while(avcodec_receive_frame(codecContext, frame) == 0)
> {
> ..
> }
> av_packet_unref(packet);
>
>
>
>
>
> --
> View this message in context:
> http://libav-users.943685.n4.nabble.com/Libav-user-Decoding-encoding-api-tp4662664p4662679.html
> Sent from the libav-users mailing list archive at Nabble.com.
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20160916/9792414e/attachment.html>
More information about the Libav-user
mailing list