diff options
author | Stefano Sabatini <stefasab@gmail.com> | 2012-09-11 18:25:58 +0200 |
---|---|---|
committer | Stefano Sabatini <stefasab@gmail.com> | 2012-09-11 21:43:27 +0200 |
commit | 34b5b735f9639d9fd2d979a42974991bb6a6ba1d (patch) | |
tree | 4f84ab2b07255b1a7c88a5094c34c7db60e2a5fa | |
parent | b3e2975ab3e116f13eeeaac730e3c6930bd69039 (diff) | |
download | ffmpeg-34b5b735f9639d9fd2d979a42974991bb6a6ba1d.tar.gz |
examples/muxing: add check on avformat_write_header() result
-rw-r--r-- | doc/examples/muxing.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/doc/examples/muxing.c b/doc/examples/muxing.c index b81f198b06..0d3f7abc48 100644 --- a/doc/examples/muxing.c +++ b/doc/examples/muxing.c @@ -469,7 +469,10 @@ int main(int argc, char **argv) } /* Write the stream header, if any. */ - avformat_write_header(oc, NULL); + if (avformat_write_header(oc, NULL) < 0) { + fprintf(stderr, "Error occurred when opening output file\n"); + return 1; + } frame->pts = 0; for (;;) { |