Commit 27c23b55 authored by Andrey Kamaev's avatar Andrey Kamaev

Merged few small fixes from 2.4 branch

parent cdad4ac7
...@@ -201,6 +201,15 @@ Closes the file and releases all the memory buffers. ...@@ -201,6 +201,15 @@ Closes the file and releases all the memory buffers.
.. ocv:function:: void FileStorage::release() .. ocv:function:: void FileStorage::release()
Call this method after all I/O operations with the storage are finished.
FileStorage::releaseAndGetString
--------------------------------
Closes the file and releases all the memory buffers.
.. ocv:function:: string FileStorage::releaseAndGetString()
Call this method after all I/O operations with the storage are finished. If the storage was opened for writing data and ``FileStorage::WRITE`` was specified Call this method after all I/O operations with the storage are finished. If the storage was opened for writing data and ``FileStorage::WRITE`` was specified
......
...@@ -5202,13 +5202,11 @@ string FileStorage::releaseAndGetString() ...@@ -5202,13 +5202,11 @@ string FileStorage::releaseAndGetString()
string buf; string buf;
if( fs.obj && fs.obj->outbuf ) if( fs.obj && fs.obj->outbuf )
icvClose(fs.obj, &buf); icvClose(fs.obj, &buf);
fs.release(); release();
structs.clear(); return buf;
state = UNDEFINED; }
return buf;
}
FileNode FileStorage::root(int streamidx) const FileNode FileStorage::root(int streamidx) const
{ {
return isOpened() ? FileNode(fs, cvGetRootFileNode(fs, streamidx)) : FileNode(); return isOpened() ? FileNode(fs, cvGetRootFileNode(fs, streamidx)) : FileNode();
......
...@@ -3278,7 +3278,7 @@ bool CvCaptureCAM_DShow::setProperty( int property_id, double value ) ...@@ -3278,7 +3278,7 @@ bool CvCaptureCAM_DShow::setProperty( int property_id, double value )
case CV_CAP_PROP_FPS: case CV_CAP_PROP_FPS:
int fps = cvRound(value); int fps = cvRound(value);
if (fps != VI.getFPS(0)) if (fps != VI.getFPS(index))
{ {
VI.stopDevice(index); VI.stopDevice(index);
VI.setIdealFramerate(index,fps); VI.setIdealFramerate(index,fps);
......
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