Bug 1065855 - Ignore updating check when setting MediaSource Duration within a SourceBuffer append - r=kinetik

--HG--
extra : rebase_source : baa31fd9d380ebf6765adb5ce89848c6dd3f4241
This commit is contained in:
Chris Double 2014-09-16 15:15:55 +12:00
Родитель 54b218302a
Коммит 11e6abb95f
2 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -105,6 +105,10 @@ public:
#endif
private:
// MediaSourceDecoder uses DurationChange to set the duration
// without hitting the checks in SetDuration.
friend class mozilla::MediaSourceDecoder;
~MediaSource();
explicit MediaSource(nsPIDOMWindow* aWindow);

Просмотреть файл

@ -76,6 +76,7 @@ MediaSourceDecoder::GetSeekable(dom::TimeRanges* aSeekable)
if (!mMediaSource) {
return NS_ERROR_FAILURE;
}
double duration = mMediaSource->Duration();
if (IsNaN(duration)) {
// Return empty range.
@ -169,7 +170,7 @@ MediaSourceDecoder::SetMediaSourceDuration(double aDuration)
return;
}
ErrorResult dummy;
mMediaSource->SetDuration(aDuration, dummy);
mMediaSource->DurationChange(aDuration, dummy);
}
void