mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-15 19:40:07 +01:00
Merge commit '596e5d4783ca951258a7c580951fd161f1785ec1'
* commit '596e5d4783ca951258a7c580951fd161f1785ec1': lavf: Add a flag to enable/disable per-packet flushing Conflicts: libavformat/avformat.h libavformat/mux.c libavformat/version.h This adds a 2nd API to set per packet flushing If the user application indicates through either a non default then this non default takes precedence over the other still default value Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -535,10 +535,13 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
|
||||
did_split = av_packet_split_side_data(pkt);
|
||||
ret = s->oformat->write_packet(s, pkt);
|
||||
if (s->flush_packets && s->pb && s->pb->error >= 0)
|
||||
|
||||
if (s->flush_packets && s->pb && ret >= 0 && s->flags & AVFMT_FLAG_FLUSH_PACKETS)
|
||||
avio_flush(s->pb);
|
||||
|
||||
if (did_split)
|
||||
av_packet_merge_side_data(pkt);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user