Commit 9a81ff73 authored by Maksim Shabunin's avatar Maksim Shabunin

Backported AVFoundation fixes from master branch

parent 94c7d99d
This diff is collapsed.
......@@ -40,6 +40,12 @@ VideoWriter_IntelMFX::VideoWriter_IntelMFX(const String &filename, int _fourcc,
return;
}
if (fps <= 0)
{
MSG(cerr << "MFX: Invalid FPS passed to encoder" << endl);
return;
}
// Init device and session
deviceHandler = createDeviceHandler();
session = new MFXVideoSession();
......
......@@ -35,7 +35,7 @@ TEST(Videoio_MFX, write_invalid)
ASSERT_NO_THROW(res = writer.open(String(), CAP_INTEL_MFX, VideoWriter::fourcc('H', '2', '6', '4'), 1, Size(640, 480), true));
EXPECT_FALSE(res);
EXPECT_FALSE(writer.isOpened());
ASSERT_ANY_THROW(res = writer.open(filename, CAP_INTEL_MFX, VideoWriter::fourcc('H', '2', '6', '4'), 0, Size(640, 480), true));
ASSERT_NO_THROW(res = writer.open(filename, CAP_INTEL_MFX, VideoWriter::fourcc('H', '2', '6', '4'), 0, Size(640, 480), true));
EXPECT_FALSE(res);
EXPECT_FALSE(writer.isOpened());
......
......@@ -419,8 +419,6 @@ static Ext_Fourcc_PSNR synthetic_params[] = {
makeParam("mp4", "MJPG", 30.f, CAP_AVFOUNDATION),
makeParam("m4v", "H264", 30.f, CAP_AVFOUNDATION),
makeParam("m4v", "MJPG", 30.f, CAP_AVFOUNDATION),
makeParam("3gp", "H264", 30.f, CAP_AVFOUNDATION),
makeParam("3gp", "MJPG", 30.f, CAP_AVFOUNDATION),
#endif
#ifdef HAVE_FFMPEG
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment