Bug 635726 - Ignore Ogg header pages in seek timestamp capture. r=doublec
authorChris Pearce <chris@pearce.org.nz>
Thu, 07 Jul 2011 09:50:44 +1200
changeset 72449 4d17b74a1df220fad9d18f66e7cbb39139188b98
parent 72448 0661e7077dceb6cbaf3c50b2b624cddcda04765f
child 72450 2b2d322e42415cb185cb338ab7ebe5c63db2d940
push id20718
push usermak77@bonardo.net
push dateThu, 07 Jul 2011 10:03:07 +0000
treeherdermozilla-central@3f9e716164ef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdoublec
bugs635726
milestone8.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 635726 - Ignore Ogg header pages in seek timestamp capture. r=doublec
content/media/ogg/nsOggReader.cpp
--- a/content/media/ogg/nsOggReader.cpp
+++ b/content/media/ogg/nsOggReader.cpp
@@ -1324,24 +1324,24 @@ nsresult nsOggReader::SeekBisection(PRIn
         if (codecState && codecState->mActive) {
           int ret = ogg_stream_pagein(&codecState->mState, &page);
           NS_ENSURE_TRUE(ret == 0, NS_ERROR_FAILURE);
         }
 
         ogg_int64_t granulepos = ogg_page_granulepos(&page);
 
         if (HasAudio() &&
-            granulepos != -1 &&
+            granulepos > 0 &&
             serial == mVorbisState->mSerial &&
             audioTime == -1) {
           audioTime = mVorbisState->Time(granulepos);
         }
         
         if (HasVideo() &&
-            granulepos != -1 &&
+            granulepos > 0 &&
             serial == mTheoraState->mSerial &&
             videoTime == -1) {
           videoTime = mTheoraState->StartTime(granulepos);
         }
 
         if (mPageOffset == endOffset) {
           // Hit end of readable data.
           break;