]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fail over to default if desired stream is not found
authorAnthony Minessale <anthony.minessale@gmail.com>
Wed, 29 Apr 2009 03:23:26 +0000 (03:23 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Wed, 29 Apr 2009 03:23:26 +0000 (03:23 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13185 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/formats/mod_local_stream/mod_local_stream.c

index b78f1d5d0855473c129b21d32e2410689026419e..e8521570a9b0424953b15a89f0dc52e8c30f2f16 100644 (file)
@@ -301,11 +301,12 @@ static switch_status_t local_stream_file_open(switch_file_handle_t *handle, cons
                return SWITCH_STATUS_FALSE;
        }
 
+       switch_mutex_lock(globals.mutex);
+
  top:
 
        alt_path = switch_mprintf("%s/%d", path, handle->samplerate);
 
-       switch_mutex_lock(globals.mutex);
        if ((source = switch_core_hash_find(globals.source_hash, alt_path))) {
                path = alt_path;
        } else {