Bug 596111 - Don't assume first WebM track is video. Seek using mVideoTrack (or mAudioTrack if there's no video). r=doublec

This commit is contained in:
Matthew Gregan 2010-09-14 13:46:48 +12:00
Родитель c7ba136cea
Коммит ad1369055d
1 изменённых файлов: 2 добавлений и 1 удалений

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

@ -697,7 +697,8 @@ nsresult nsWebMReader::Seek(PRInt64 aTarget, PRInt64 aStartTime, PRInt64 aEndTim
if (NS_FAILED(ResetDecode())) {
return NS_ERROR_FAILURE;
}
int r = nestegg_track_seek(mContext, 0, aTarget * NS_PER_MS);
PRUint32 trackToSeek = mHasVideo ? mVideoTrack : mAudioTrack;
int r = nestegg_track_seek(mContext, trackToSeek, aTarget * NS_PER_MS);
if (r != 0) {
return NS_ERROR_FAILURE;
}