Permalink
Browse files

Fix bug in mythtranscodes clean-cutting mechanism

One of the clean-cut methods interacted badly with mythtranscodes
synchronisation algorithm and would sometimes cause frames from
cut segments to be kept. This commit fixes that bug

Refs #11531
  • Loading branch information...
Paul Gardiner authored and dekarl committed May 9, 2013
1 parent 95c7a87 commit 3e5a0008306d18fe5237167b04b99b2af14c846c
Showing with 12 additions and 1 deletion.
  1. +12 −1 mythtv/programs/mythtranscode/cutter.cpp
View
@@ -191,7 +191,18 @@ bool Cutter::InhibitDropFrame()
// amount to drop is sufficient then we can drop less
// audio rather than drop a frame
audioFramesToCut -= (int64_t)(audioFramesPerVideoFrame + 0.5);
return true;
// But if it's a frame we are supposed to drop anyway, still do so,
// and record that we have
if (videoFramesToCut > 0)
{
videoFramesToCut-- ;
return false;
}
else
{
return true;
}
}
else
{

0 comments on commit 3e5a000

Please sign in to comment.