Skip to content

Commit

Permalink
Editor: Clean up garbage marks after end of video.
Browse files Browse the repository at this point in the history
Clean up marks that occur after the last frame in the DeleteMap.  Some
users mentioned that these marks were causing problems in seeking, so
since they shouldn't exist, clean them up.
  • Loading branch information
sphery committed Jan 25, 2011
1 parent a4d395b commit 53b8199
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions mythtv/libs/libmythtv/deletemap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ void DeleteMap::NewCut(uint64_t frame, uint64_t total)
// to beginning or end
if (startframe == 1)
startframe = 0;
if (endframe == total - 1)
if (endframe >= total - 1)
endframe = total;

// Don't cut the entire recording
Expand Down Expand Up @@ -554,7 +554,11 @@ void DeleteMap::CleanMap(uint64_t total)
{
int thistype = it.value();
uint64_t thisframe = it.key();
if (lasttype == thistype)
if (thisframe >= total)
{
Delete(thisframe);
}
else if (lasttype == thistype)
{
Delete(thistype == MARK_CUT_END ? thisframe :
(uint64_t)lastframe);
Expand Down

0 comments on commit 53b8199

Please sign in to comment.