Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix bug in mythtranscodes clean-cutting mechanism #46

Closed
wants to merge 1 commit into from

1 participant

@Glidos

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

Paul Gardiner 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
bf3732b
@Glidos Glidos closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 9, 2013
  1. Fix bug in mythtranscodes clean-cutting mechanism

    Paul Gardiner authored
    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
This page is out of date. Refresh to see the latest.
Showing with 12 additions and 1 deletion.
  1. +12 −1 mythtv/programs/mythtranscode/transcode.cpp
View
13 mythtv/programs/mythtranscode/transcode.cpp
@@ -578,7 +578,18 @@ class Cutter
// 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
{
Something went wrong with that request. Please try again.