Browse Source

mux: Make sure that the data is actually written

And forward the error if it is not.

Bug-Id: 881

CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
tags/n3.0
Sean McGovern Luca Barbato 9 years ago
parent
commit
9ad1e0c12c
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      libavformat/mux.c

+ 6
- 2
libavformat/mux.c View File

@@ -352,8 +352,12 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt)
}
ret = s->oformat->write_packet(s, pkt);

if (s->pb && ret >= 0 && s->flags & AVFMT_FLAG_FLUSH_PACKETS)
avio_flush(s->pb);
if (s->pb && ret >= 0) {
if (s->flags & AVFMT_FLAG_FLUSH_PACKETS)
avio_flush(s->pb);
if (s->pb->error < 0)
ret = s->pb->error;
}

return ret;
}


Loading…
Cancel
Save