mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-28 13:40:55 +00:00
examples/muxing: add check on avformat_write_header() result
This commit is contained in:
parent
b3e2975ab3
commit
34b5b735f9
@ -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 (;;) {
|
||||
|
Loading…
Reference in New Issue
Block a user