Merge commit 'f19fbfbdc637e08ad5c980807ede2d023f20c049'

* commit 'f19fbfbdc637e08ad5c980807ede2d023f20c049':
  aviocat: Check for output write errors

Merged-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer 2017-11-11 13:55:35 -03:00
commit 460e7596cb
1 changed files with 5 additions and 0 deletions

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