1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 15:23:05 +04:00

ffmpeg: check return value

This commit is contained in:
Alexander Alekhin
2016-11-10 15:55:47 +03:00
parent 12569dc730
commit 40aa8aa862
+3
View File
@@ -2455,11 +2455,14 @@ bool OutputMediaStream_FFMPEG::open(const char* fileName, int width, int height,
}
// write the stream header, if any
int header_err =
#if LIBAVFORMAT_BUILD < CALC_FFMPEG_VERSION(53, 2, 0)
av_write_header(oc_);
#else
avformat_write_header(oc_, NULL);
#endif
if (header_err != 0)
return false;
return true;
}