You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avformat/mux: fix flush_packets flag with flushing buffers
Found-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -632,7 +632,7 @@ int av_write_frame(AVFormatContext *s, AVPacket *pkt)
|
|||||||
if (!pkt) {
|
if (!pkt) {
|
||||||
if (s->oformat->flags & AVFMT_ALLOW_FLUSH) {
|
if (s->oformat->flags & AVFMT_ALLOW_FLUSH) {
|
||||||
ret = s->oformat->write_packet(s, NULL);
|
ret = s->oformat->write_packet(s, NULL);
|
||||||
if (s->flush_packets && s->pb && s->pb->error >= 0)
|
if (s->flush_packets && s->pb && s->pb->error >= 0 && s->flags & AVFMT_FLAG_FLUSH_PACKETS)
|
||||||
avio_flush(s->pb);
|
avio_flush(s->pb);
|
||||||
if (ret >= 0 && s->pb && s->pb->error < 0)
|
if (ret >= 0 && s->pb && s->pb->error < 0)
|
||||||
ret = s->pb->error;
|
ret = s->pb->error;
|
||||||
|
Reference in New Issue
Block a user