Bug 980052 - Compare the value and not the pointer when checking validity of the preferred sample rate in the OpenSL cubeb backend. r=kinetik
authorPaul Adenot <paul@paul.cx>
Tue, 11 Mar 2014 09:42:10 +0800
changeset 190092 61a399044b5a60380fc1a260567ad709ec08f3ad
parent 190091 da877497bf3edefb4169d0dc4aef84d1522d94d6
child 190093 72a2f1fcea40e0fd17c31c6c57de232722d739d2
push id3503
push userraliiev@mozilla.com
push dateMon, 28 Apr 2014 18:51:11 +0000
treeherdermozilla-beta@c95ac01e332e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskinetik
bugs980052
milestone30.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 980052 - Compare the value and not the pointer when checking validity of the preferred sample rate in the OpenSL cubeb backend. r=kinetik
media/libcubeb/src/cubeb_opensl.c
--- a/media/libcubeb/src/cubeb_opensl.c
+++ b/media/libcubeb/src/cubeb_opensl.c
@@ -273,17 +273,17 @@ opensl_get_preferred_sample_rate(cubeb *
   }
 
   dlclose(libmedia);
 
   /* Depending on which method we called above, we can get a zero back, yet have
    * a non-error return value, especially if the audio system is not
    * ready/shutting down (i.e. when we can't get our hand on the AudioFlinger
    * thread). */
-  if (rate == 0) {
+  if (*rate == 0) {
     return CUBEB_ERROR;
   }
 
   return CUBEB_OK;
 }
 
 static int
 opensl_get_min_latency(cubeb * ctx, cubeb_stream_params params, uint32_t * latency_ms)