Skip to content

Commit

Permalink
BMediaEventLooper::SetBufferDuration: Clamp if negative
Browse files Browse the repository at this point in the history
* For the sake of making the code more backward compatible,
and safer eventually.
  • Loading branch information
Numerio committed May 7, 2016
1 parent 6d63bc5 commit b18c444
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/kits/media/MediaEventLooper.cpp
Expand Up @@ -417,6 +417,10 @@ void
BMediaEventLooper::SetBufferDuration(bigtime_t duration)
{
CALLED();

if (duration < 0)
duration = 0;

fBufferDuration = duration;
}

Expand Down

0 comments on commit b18c444

Please sign in to comment.