зеркало из https://github.com/mozilla/gecko-dev.git
bug 1194558 correct time conversion for video frame timestamps r=roc
MediaTimeToSeconds() works fine for negative intervals --HG-- extra : rebase_source : 8698761e28a54e6bd172a032c62e03b96ac66bfa
This commit is contained in:
Родитель
47185cd76f
Коммит
257b2b6cc9
|
@ -1166,7 +1166,7 @@ MediaStreamGraphImpl::PlayVideo(MediaStream* aStream)
|
|||
GraphTime startTime = StreamTimeToGraphTime(aStream,
|
||||
start, INCLUDE_TRAILING_BLOCKED_INTERVAL);
|
||||
TimeStamp targetTime = CurrentDriver()->GetCurrentTimeStamp() +
|
||||
TimeDuration::FromMilliseconds(double(startTime - IterationEnd()));
|
||||
TimeDuration::FromSeconds(MediaTimeToSeconds(startTime - IterationEnd()));
|
||||
for (uint32_t i = 0; i < aStream->mVideoOutputs.Length(); ++i) {
|
||||
VideoFrameContainer* output = aStream->mVideoOutputs[i];
|
||||
|
||||
|
|
|
@ -448,7 +448,8 @@ public:
|
|||
|
||||
double MediaTimeToSeconds(GraphTime aTime) const
|
||||
{
|
||||
NS_ASSERTION(0 <= aTime && aTime <= STREAM_TIME_MAX, "Bad time");
|
||||
NS_ASSERTION(aTime > -STREAM_TIME_MAX && aTime <= STREAM_TIME_MAX,
|
||||
"Bad time");
|
||||
return static_cast<double>(aTime)/GraphRate();
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче