1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-08-08 10:25:46 +02:00

examples/muxing: add check on avformat_write_header() result

This commit is contained in:
Stefano Sabatini 2012-09-11 18:25:58 +02:00
parent b3e2975ab3
commit 34b5b735f9

View File

@ -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 (;;) {