Skip to content

Commit

Permalink
tidy: Remove unused code from AvFormatDecoderBD::BDFindPosition.
Browse files Browse the repository at this point in the history
The clang-tidy "dead stores" checker pointed out that a variable in
this function is set, but that value is never used.  Investigating the
code, there is a ten line code block that computes the value of
'desiredTimePos', and then the value is ignored.  The entire ten lines
can be removed.  They are now conditionally compiled out in case
someone wants to revisit whether the function should be returning a
value based on 'desiredTimePos' or 'desiredFrame'.
  • Loading branch information
linuxdude42 committed Mar 26, 2019
1 parent 11b66f8 commit bc4895a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mythtv/libs/libmythtv/Bluray/avformatdecoderbd.cpp
Expand Up @@ -152,6 +152,7 @@ long long AvFormatDecoderBD::BDFindPosition(long long desiredFrame)

if (ffrewSkip == 1 || ffrewSkip == 0)
{
#if 0
int diffTime = (int)ceil((desiredFrame - m_framesPlayed) / m_fps);
long long desiredTimePos = ringBuffer->BD()->GetCurrentTime() +
diffTime;
Expand All @@ -162,6 +163,7 @@ long long AvFormatDecoderBD::BDFindPosition(long long desiredFrame)

if (desiredTimePos < 0)
desiredTimePos = 0;
#endif
return (desiredFrame * 90000LL / m_fps);
}
return current_speed;
Expand Down

0 comments on commit bc4895a

Please sign in to comment.