1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

aviocat: Check for output write errors

Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
Martin Storsjö 2017-09-03 00:02:54 +03:00
parent 585dc1aece
commit f19fbfbdc6

View File

@ -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);