[FFmpeg-cvslog] examples/muxing: add check on avformat_write_header() result
Stefano Sabatini
git at videolan.org
Tue Sep 11 21:44:21 CEST 2012
ffmpeg | branch: master | Stefano Sabatini <stefasab at gmail.com> | Tue Sep 11 18:25:58 2012 +0200| [34b5b735f9639d9fd2d979a42974991bb6a6ba1d] | committer: Stefano Sabatini
examples/muxing: add check on avformat_write_header() result
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=34b5b735f9639d9fd2d979a42974991bb6a6ba1d
---
doc/examples/muxing.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/doc/examples/muxing.c b/doc/examples/muxing.c
index b81f198..0d3f7ab 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 (;;) {
More information about the ffmpeg-cvslog
mailing list