Commit 34b5b735 authored by Stefano Sabatini's avatar Stefano Sabatini

examples/muxing: add check on avformat_write_header() result

parent b3e2975a
......@@ -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 (;;) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment