mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-12 18:10:13 +01:00
avformat/avformat: Deprecate AVFMT_ALLOW_FLUSH
It is of no value to the user, because every muxer can always
be flushed with a NULL packet. As its documentation shows
("If not set, the muxer will not receive a NULL packet in
the write_packet function") it is actually an internal flag
that has been publically exposed because there was no internal
flags field for output formats for a long time. But now there is
and so use it by replacing the public flag with a private one.
Reviewed-by: James Almer <jamrial@gmail.com>
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Reviewed-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@@ -1206,7 +1206,13 @@ int av_write_frame(AVFormatContext *s, AVPacket *in)
|
||||
int ret;
|
||||
|
||||
if (!in) {
|
||||
#if FF_API_ALLOW_FLUSH || LIBAVFORMAT_VERSION_MAJOR >= 61
|
||||
// Hint: The pulse audio output device has this set,
|
||||
// so we can't switch the check to FF_FMT_ALLOW_FLUSH immediately.
|
||||
if (s->oformat->flags & AVFMT_ALLOW_FLUSH) {
|
||||
#else
|
||||
if (ffofmt(s->oformat)->flags_internal & FF_FMT_ALLOW_FLUSH) {
|
||||
#endif
|
||||
ret = ffofmt(s->oformat)->write_packet(s, NULL);
|
||||
flush_if_needed(s);
|
||||
if (ret >= 0 && s->pb && s->pb->error < 0)
|
||||
|
||||
Reference in New Issue
Block a user