mirror of
https://github.com/opencv/opencv.git
synced 2025-06-10 02:53:07 +08:00
ffmpeg: check return value
This commit is contained in:
parent
12569dc730
commit
40aa8aa862
@ -2455,11 +2455,14 @@ bool OutputMediaStream_FFMPEG::open(const char* fileName, int width, int height,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// write the stream header, if any
|
// write the stream header, if any
|
||||||
|
int header_err =
|
||||||
#if LIBAVFORMAT_BUILD < CALC_FFMPEG_VERSION(53, 2, 0)
|
#if LIBAVFORMAT_BUILD < CALC_FFMPEG_VERSION(53, 2, 0)
|
||||||
av_write_header(oc_);
|
av_write_header(oc_);
|
||||||
#else
|
#else
|
||||||
avformat_write_header(oc_, NULL);
|
avformat_write_header(oc_, NULL);
|
||||||
#endif
|
#endif
|
||||||
|
if (header_err != 0)
|
||||||
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user