[FFmpeg-devel] [PATCH] avcodec/avcodec: Fix text implying single threaded decoding

Michael Niedermayer michael at niedermayer.cc
Tue Apr 18 17:01:48 EEST 2017


On Tue, Apr 18, 2017 at 03:47:29PM +0200, Nicolas George wrote:
> Le nonidi 29 germinal, an CCXXV, Michael Niedermayer a écrit :
> > This contradicts the documentation: (and would be rather rigid design)
> 
> Possible. But it has nothing to do with threading.
> 
> > > threaded decoder will just start the work and return EAGAIN.
> > Thats true but this is not permitted by the text prior to my patch
> 
> Yes it is.
> 

> > The requiement to call avcodec_receive_frame() multiple times implies
> > it does not return EAGAIN because you would not call it again if it
> > did.
> 
> No, you would not call it again, you would first have to feed it another
> packet. Still no problem at this level.

Iam not sure you did read the text the patch changes

"... require you to call avcodec_receive_frame() multiple
 times afterwards before you can send a new packet"

this just isnt true
if a decoder returns EAGAIN you would not call it multiple times


Heres the whole again for reference:

  *                  Unlike with older APIs, the packet is always fully consumed,
  *                  and if it contains multiple frames (e.g. some audio codecs),
  *                  will require you to call avcodec_receive_frame() multiple
- *                  times afterwards before you can send a new packet.
+ *                  times afterwards.

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If you fake or manipulate statistics in a paper in physics you will never
get a job again.
If you fake or manipulate statistics in a paper in medicin you will get
a job for life at the pharma industry.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170418/07ba9c23/attachment.sig>


More information about the ffmpeg-devel mailing list