aviocat: Check for output write errors

Signed-off-by: Martin Storsjö <martin@martin.st>
pull/272/head
Martin Storsjö 7 years ago
parent 585dc1aece
commit f19fbfbdc6
  1. 5
      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);

Loading…
Cancel
Save