Commit 4bbe71a2 authored by zmoelnig's avatar zmoelnig
Browse files

only try to set the codec if it has been define

git-svn-id: https://pd-gem.svn.sourceforge.net/svnroot/pd-gem/trunk/Gem@3651 49b2a0ca-c541-4d49-a7ef-d785e4371512
parent 866a79c1
......@@ -201,17 +201,15 @@ void pix_record :: startRecording()
gem::record *handle=NULL;
// find a handle for the current settings (filename, codec, props)
const std::string codec=m_codec;
if(m_handle) {
stopRecording();
}
m_currentFrame = 0;
int i=0;
for(i=0; i<m_handles.size(); i++) {
// check whether the handle supports the requested codec
handle=m_handles[i];
if(!handle->setCodec(codec))
if(!codec.empty() && !handle->setCodec(codec))
continue;
if(handle->start(m_filename, m_props)) {
m_handle=handle;
......@@ -220,9 +218,6 @@ void pix_record :: startRecording()
handle=NULL;
}
}
if(m_handle) {
m_filename=std::string("");
m_recording=true;
......
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