On Tue, Apr 18, 2017 at 07:09:30AM +0200, Nicolas George wrote:
> Le nonidi 29 germinal, an CCXXV, Michael Niedermayer a écrit :
> > > + while ((ret = avcodec_receive_packet(enc, &pkt)) ==
> > > AVERROR(EAGAIN)) {
> > > + ret = avcodec_send_frame(enc, NULL);
>
> The doc says:
>
> # The functions will not return AVERROR(EAGAIN), unless you forgot to
> # enter draining mode.The full paragraph in the docs which you qoted from says this: * - Call avcodec_receive_frame() (decoding) or avcodec_receive_packet() * (encoding) in a loop until AVERROR_EOF is returned. The functions will * not return AVERROR(EAGAIN), unless you forgot to enter draining mode. the patch adds a check to avcodec_send_frame() > > > can the code be changed to not require this ? > > I would say the code does not require this as is. For decoding theres an explicit "Sending the first flush packet will return success." I cannot find similar for encoding, which is the case the patch changes and what i think should be fixed if possible as it would be simpler, making the patch unneeded. Its quite possible iam missing something that makes it uneeded though [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Those who are best at talking, realize last or never when they are wrong.
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list [email protected] http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
