diff options
author | Martin Storsjö <martin@martin.st> | 2017-09-03 00:02:54 +0300 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2017-09-04 09:42:52 +0300 |
commit | f19fbfbdc637e08ad5c980807ede2d023f20c049 (patch) | |
tree | bcbefda121e1d6c16774bceb25949bba0cdd290a /tools | |
parent | 585dc1aecef0371ad6f16cb3750ae2a6da9cf00a (diff) | |
download | ffmpeg-f19fbfbdc637e08ad5c980807ede2d023f20c049.tar.gz |
aviocat: Check for output write errors
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/aviocat.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/aviocat.c b/tools/aviocat.c index 3e49a61801..73104da174 100644 --- a/tools/aviocat.c +++ b/tools/aviocat.c @@ -107,6 +107,11 @@ int main(int argc, char **argv) if (n <= 0) break; avio_write(output, buf, n); + if (output->error) { + av_strerror(output->error, errbuf, sizeof(errbuf)); + fprintf(stderr, "Unable to write %s: %s\n", output_url, errbuf); + break; + } stream_pos += n; if (bps) { avio_flush(output); |