# HG changeset patch # User William Pitcock # Date 1240722119 18000 # Node ID 8f56795e348d1712a73ed3654b7fc08b4a90d834 # Parent ca7d5de41217f715b18a5ca752e7b20e6a44a99d crossfade-ng: correctly workaround possible buffer starvation issues with streams diff -r ca7d5de41217 -r 8f56795e348d src/crossfade/crossfade.c --- a/src/crossfade/crossfade.c Fri Apr 24 22:24:01 2009 -0500 +++ b/src/crossfade/crossfade.c Sun Apr 26 00:01:59 2009 -0500 @@ -967,12 +967,8 @@ g_free(last_filename); last_filename = g_strdup(file); - /* cleanup */ - g_free(file); file = NULL; - g_free(title); title = NULL; - - /* check for HTTP streaming */ - if (config->enable_http_workaround && (0 == strncasecmp(file, "http://", 7))) + /* check for streaming */ + if (aud_vfs_is_remote(file)) { DEBUG(("[crossfade] open_audio: HTTP underrun workaround enabled.\n")); is_http = TRUE; @@ -980,6 +976,9 @@ else is_http = FALSE; + g_free(file); file = NULL; + g_free(title); title = NULL; + /* lock buffer */ MUTEX_LOCK(&buffer_mutex);