[FFmpeg-devel] [PATCH] libavformat: Add FIFO pseudo-muxer

Nicolas George george at nsup.org
Tue Jul 12 11:28:22 EEST 2016


Le quintidi 25 messidor, an CCXXIV, Marton Balint a écrit :
> The fifo muxer never returns EAGAIN. It silently drops the packets in
> non-blocking mode on a full queue. This behaviour is useful for the tee
> muxer case, when you don't want one slow/unreliable (network) output to
> block reading the input, therefore blocking fast outputs (disk) as well.

Wait a minute. This is way to specific to be the default behaviour, let
alone the only one.

> As far as I know, in the current API, if the user gets a negative return
> value from av_write_frame(), it should be handled as a fatal error. EAGAIN
> is not handled/interpreted specially. The same is true for
> av_write_trailer(), and calling av_write_trailer - regardless of the return
> value - frees all private resources for the context as well, so you cannot
> change the semantics of av_write_trailer to not free private data in case of
> EAGAIN, because it would cause unfreed data for legacy users.

You are wrong. Returning EAGAIN so that the caller try again later is the
normal behaviour for muxers that support non-blocking operation. I grant you
that there are only between one and three of them, but still, that is how
they work.

And that is also how they are supposed to work, because that is how
non-blocking protocols work, and also how non-blocking works outside FFmpeg.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160712/6b42be1b/attachment.sig>


More information about the ffmpeg-devel mailing list