From ad1369055d57eeef248e18a4e397e4610f9481c5 Mon Sep 17 00:00:00 2001 From: Matthew Gregan Date: Tue, 14 Sep 2010 13:46:48 +1200 Subject: [PATCH] Bug 596111 - Don't assume first WebM track is video. Seek using mVideoTrack (or mAudioTrack if there's no video). r=doublec --- content/media/webm/nsWebMReader.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/content/media/webm/nsWebMReader.cpp b/content/media/webm/nsWebMReader.cpp index f4f9846fa547..6d35097ef32e 100644 --- a/content/media/webm/nsWebMReader.cpp +++ b/content/media/webm/nsWebMReader.cpp @@ -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; }