OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e05f7ed
)
mux: Make sure that the data is actually written
author
Sean McGovern
<gseanmcg@gmail.com>
Thu, 27 Aug 2015 04:04:16 +0000
(
00:04
-0400)
committer
Luca Barbato
<lu_zero@gentoo.org>
Thu, 3 Sep 2015 11:39:34 +0000
(13:39 +0200)
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>
libavformat/mux.c
patch
|
blob
|
history
diff --git
a/libavformat/mux.c
b/libavformat/mux.c
index
7959edf
..
4bba970
100644
(file)
--- a/
libavformat/mux.c
+++ b/
libavformat/mux.c
@@
-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;
}