Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Kdenlive
Commits
9137592a
Commit
9137592a
authored
Jun 28, 2019
by
Jean-Baptiste Mardelle
Browse files
Fix error in mirror track calculation.
Fixes #276
parent
b43b737f
Pipeline
#4703
passed with stage
in 14 minutes and 20 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/timeline2/model/timelinemodel.cpp
View file @
9137592a
...
...
@@ -421,23 +421,17 @@ int TimelineModel::getMirrorVideoTrackId(int trackId) const
return
-
1
;
}
int
count
=
0
;
if
(
it
!=
m_allTracks
.
cend
())
{
++
it
;
}
while
(
it
!=
m_allTracks
.
cend
())
{
if
((
*
it
)
->
isAudioTrack
())
{
count
++
;
}
else
{
count
--
;
if
(
count
==
0
)
{
return
(
*
it
)
->
getId
();
}
count
--
;
}
++
it
;
}
if
(
it
!=
m_allTracks
.
cend
()
&&
!
(
*
it
)
->
isAudioTrack
()
&&
count
==
0
)
{
return
(
*
it
)
->
getId
();
}
return
-
1
;
}
...
...
@@ -456,21 +450,22 @@ int TimelineModel::getMirrorAudioTrackId(int trackId) const
auto
it
=
m_iteratorTable
.
at
(
trackId
);
if
((
*
it
)
->
isAudioTrack
())
{
// we expected a video track...
qDebug
()
<<
"++++++++
\n
+++++++ ERROR RQSTNG AUDIO MIRROR FOR AUDIO"
;
return
-
1
;
}
int
count
=
0
;
while
(
it
!=
m_allTracks
.
cbegin
())
{
--
it
;
if
(
!
(
*
it
)
->
isAudioTrack
())
{
count
++
;
}
else
{
count
--
;
if
(
count
==
0
)
{
return
(
*
it
)
->
getId
();
}
count
--
;
}
--
it
;
}
if
((
*
it
)
->
isAudioTrack
()
&&
count
==
0
)
{
if
((
*
it
)
->
isAudioTrack
()
&&
count
==
1
)
{
return
(
*
it
)
->
getId
();
}
return
-
1
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment