Bug 1074004 - Fix WebMioData implementation in TestWebMWriter. r=giles
authorMatthew Gregan <kinetik@flim.org>
Mon, 29 Sep 2014 13:13:21 +1300
changeset 208090 5997c0f393ba4f67eeb35a60c3cc1370824362a4
parent 208089 27bcbf49cfd7de5bf9eb356069ead2eebc4747a1
child 208091 bec9ccb868102df010f71efd110b036ef55d4f1a
push id49846
push usermgregan@mozilla.com
push dateWed, 01 Oct 2014 03:35:05 +0000
treeherdermozilla-inbound@5997c0f393ba [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgiles
bugs1074004
milestone35.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 1074004 - Fix WebMioData implementation in TestWebMWriter. r=giles
content/media/gtest/TestWebMWriter.cpp
media/libcubeb/update.sh
--- a/content/media/gtest/TestWebMWriter.cpp
+++ b/content/media/gtest/TestWebMWriter.cpp
@@ -235,18 +235,17 @@ struct WebMioData {
 
 static int webm_read(void* aBuffer, size_t aLength, void* aUserData)
 {
   NS_ASSERTION(aUserData, "aUserData must point to a valid WebMioData");
   WebMioData* ioData = static_cast<WebMioData*>(aUserData);
 
   // Check the read length.
   if (aLength > ioData->data.Length()) {
-    NS_ERROR("Invalid read length");
-    return -1;
+    return 0;
   }
 
   // Check eos.
   if (ioData->offset.value() >= ioData->data.Length()) {
     return 0;
   }
 
   size_t oldOffset = ioData->offset.value();
@@ -287,17 +286,17 @@ static int webm_seek(int64_t aOffset, in
       return -1;
   }
 
   if (!ioData->offset.isValid()) {
     NS_ERROR("Invalid offset");
     return -1;
   }
 
-  return 1;
+  return 0;
 }
 
 static int64_t webm_tell(void* aUserData)
 {
   NS_ASSERTION(aUserData, "aUserData must point to a valid WebMioData");
   WebMioData* ioData = static_cast<WebMioData*>(aUserData);
   return ioData->offset.isValid() ? ioData->offset.value() : -1;
 }
old mode 100644
new mode 100755