ffmpeg: check return value

pull/7641/head
Alexander Alekhin 8 years ago
parent 12569dc730
commit 40aa8aa862
  1. 3
      modules/videoio/src/cap_ffmpeg_impl.hpp

@ -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;
}

Loading…
Cancel
Save