Commit 5b17bf75 authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen
Browse files

Fixed clip splitting

parent 5e43f7fc
......@@ -176,19 +176,11 @@ void Clip::setEnd( qint64 end )
emit lengthUpdated();
}
Clip* Clip::split( float newEnd )
Clip* Clip::split( qint64 endFrame )
{
Q_ASSERT( newEnd != m_end );
Clip* newClip = new Clip( this, newEnd, m_end );
m_end = newEnd;
Q_ASSERT( endFrame != m_end );
Clip* newClip = new Clip( this, endFrame, m_end );
m_end = endFrame;
computeLength();
return newClip;
}
Clip* Clip::split( qint64 endFrame )
{
//FIXME the conversion *breaks* clip spliting
//But we don't have any other choice for now, VLC only support float positions!
float newEnd = (float) endFrame / m_parent->getNbFrames();
return split( newEnd );
}
......@@ -93,14 +93,7 @@ class Clip : public QObject
* newly created Clip.
* \returns A new Clip starting at newEnd.
*/
Clip* split( float newEnd );
/**
* \brief Split this clip in two parts (provided for compatibility)
* \param newEnd The new end for this clip (provided for compatibility)
* \returns A new Clip starting at endFrame.
*/
Clip* split( qint64 endFrame );
Clip* split( qint64 newEndFrame );
private:
void computeLength();
......
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