added explicit VideoWriter::release(). Fixed video stream finalization (write remaining frames); Fixed occasional crash in the case of odd-width or odd-height videos; Fixed a few problems in ffmpeg tests. Positioning still does not work well.

This commit is contained in:
Vadim Pisarevsky
2012-04-09 23:12:52 +00:00
parent 1a1d7baf9a
commit b253665f8c
8 changed files with 119 additions and 63 deletions

View File

@@ -493,9 +493,14 @@ VideoWriter::VideoWriter(const string& filename, int fourcc, double fps, Size fr
open(filename, fourcc, fps, frameSize, isColor);
}
VideoWriter::~VideoWriter()
void VideoWriter::release()
{
writer.release();
}
VideoWriter::~VideoWriter()
{
release();
}
bool VideoWriter::open(const string& filename, int fourcc, double fps, Size frameSize, bool isColor)