Browse Source

aviocat: Check for output write errors

Signed-off-by: Martin Storsjö <martin@martin.st>
tags/n4.0
Martin Storsjö 8 years ago
parent
commit
f19fbfbdc6
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      tools/aviocat.c

+ 5
- 0
tools/aviocat.c 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);


Loading…
Cancel
Save