Merge commit 'f19fbfbdc637e08ad5c980807ede2d023f20c049'
authorJames Almer <jamrial@gmail.com>
Sat, 11 Nov 2017 16:55:35 +0000 (13:55 -0300)
committerJames Almer <jamrial@gmail.com>
Sat, 11 Nov 2017 16:55:35 +0000 (13:55 -0300)
* commit 'f19fbfbdc637e08ad5c980807ede2d023f20c049':
  aviocat: Check for output write errors

Merged-by: James Almer <jamrial@gmail.com>
tools/aviocat.c

index 983108a..28529b0 100644 (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);