|
Lines 1028-1033
Link Here
|
| 1028 |
int i; |
1028 |
int i; |
| 1029 |
Node *node; |
1029 |
Node *node; |
| 1030 |
|
1030 |
|
|
|
1031 |
int nothing_on_list; |
| 1031 |
int tryagain; |
1032 |
int tryagain; |
| 1032 |
int usefps; |
1033 |
int usefps; |
| 1033 |
int nomouseinput; |
1034 |
int nomouseinput; |
|
Lines 1175-1200
Link Here
|
| 1175 |
} |
1176 |
} |
| 1176 |
} |
1177 |
} |
| 1177 |
|
1178 |
|
|
|
1179 |
nothing_on_list = 0; |
| 1178 |
local_td->instance->currentnode = local_list; |
1180 |
local_td->instance->currentnode = local_list; |
| 1179 |
if (local_list == NULL) { |
1181 |
if (local_list == NULL) { |
| 1180 |
if (DEBUG) |
1182 |
if (DEBUG) |
| 1181 |
printf("----player thread: nothing on the list to play\n"); |
1183 |
printf("----player thread: nothing on the list to play\n"); |
| 1182 |
break; |
1184 |
nothing_on_list = 1; |
| 1183 |
} |
|
|
| 1184 |
//we have a node to play |
| 1185 |
if (DEBUG) { |
| 1186 |
printf("----player thread: chose url %s\n", local_list->url); |
| 1187 |
} |
1185 |
} |
|
|
1186 |
else { |
| 1187 |
//we have a node to play |
| 1188 |
if (DEBUG) { |
| 1189 |
printf("----player thread: chose url %s\n", local_list->url); |
| 1190 |
} |
| 1188 |
|
1191 |
|
| 1189 |
snprintf(local_url, 1024, "%s", local_list->url); |
1192 |
snprintf(local_url, 1024, "%s", local_list->url); |
| 1190 |
local_url[1023] = '\0'; |
1193 |
local_url[1023] = '\0'; |
| 1191 |
local_mmsstream = local_list->mmsstream; |
1194 |
local_mmsstream = local_list->mmsstream; |
|
|
1195 |
} |
| 1192 |
|
1196 |
|
| 1193 |
pthread_mutex_unlock(&(local_td->instance->playlist_mutex)); |
1197 |
pthread_mutex_unlock(&(local_td->instance->playlist_mutex)); |
| 1194 |
pthread_cleanup_pop(0); |
1198 |
pthread_cleanup_pop(0); |
| 1195 |
|
1199 |
|
| 1196 |
pthread_testcancel(); |
1200 |
pthread_testcancel(); |
| 1197 |
|
1201 |
|
|
|
1202 |
// Make sure to exit after unlocking the mutex, once we're sure the list is empty. |
| 1203 |
if (nothing_on_list) |
| 1204 |
break; |
| 1198 |
|
1205 |
|
| 1199 |
usefps = 0; |
1206 |
usefps = 0; |
| 1200 |
nomouseinput = 0; |
1207 |
nomouseinput = 0; |