Message ID | 1471344826-25138-1-git-send-email-sebechlebskyjan@gmail.com |
---|---|
State | Rejected |
Headers | show |
Le decadi 30 thermidor, an CCXXIV, sebechlebskyjan@gmail.com a écrit : > From: Jan Sebechlebsky <sebechlebskyjan@gmail.com> > > Muxing might be running in a separate thread if actual muxer is > run inside of fifo pseudo-muxer. Callback should be therefore > thread-safe. This is an incompatible API change, and therefore not acceptable. Regards,
On Tue, 16 Aug 2016, Nicolas George wrote: > Le decadi 30 thermidor, an CCXXIV, sebechlebskyjan@gmail.com a écrit : >> From: Jan Sebechlebsky <sebechlebskyjan@gmail.com> >> >> Muxing might be running in a separate thread if actual muxer is >> run inside of fifo pseudo-muxer. Callback should be therefore >> thread-safe. > > This is an incompatible API change, and therefore not acceptable. > I think the idea was to document this limitation to the fifo muxer only. Regards, Marton
Le decadi 30 thermidor, an CCXXIV, Marton Balint a écrit :
> I think the idea was to document this limitation to the fifo muxer only.
That would be acceptable, although I still think it would be preferable to
avoid that requirement altogether.
Regards,
On 08/16/2016 06:42 PM, Nicolas George wrote: > Le decadi 30 thermidor, an CCXXIV, Marton Balint a écrit : >> I think the idea was to document this limitation to the fifo muxer only. > That would be acceptable, although I still think it would be preferable to > avoid that requirement altogether. > > Regards, > Is it OK, if I leave the comment only in avformat.h in AVFormatContext and change it to "Callback must be thread safe when fifo muxer is used"? Regards, Jan
diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 79c2511..8550dca 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -1564,7 +1564,7 @@ typedef struct AVFormatContext { * muxing: set by the user before avformat_write_header() * (mainly useful for AVFMT_NOFILE formats). The callback * should also be passed to avio_open2() if it's used to - * open the file. + * open the file. The callback must be thread-safe. */ AVIOInterruptCB interrupt_callback; diff --git a/libavformat/avio.h b/libavformat/avio.h index b1ce1d1..b5d1396 100644 --- a/libavformat/avio.h +++ b/libavformat/avio.h @@ -43,6 +43,8 @@ * opaque as parameter. If the callback returns 1, the * blocking operation will be aborted. * + * If the callback is used in muxing context, it has to be thread-safe. + * * No members can be added to this struct without a major bump, if * new elements have been added after this struct in AVFormatContext * or AVIOContext.