Changeset 169
- Timestamp:
- 10/02/07 12:01:07
(1 year ago)
- Author:
- sip
- Message:
Fixed issue with PLAY responses with no range header.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r166 |
r169 |
|
| 1268 | 1268 | { |
|---|
| 1269 | 1269 | /* log */ |
|---|
| 1270 | | ast_log(LOG_ERROR,"No session\n"); |
|---|
| | 1270 | ast_log(LOG_ERROR,"No session [%s]\n",buffer); |
|---|
| 1271 | 1271 | /* Uh? */ |
|---|
| 1272 | 1272 | player->end = 1; |
|---|
| … | … | |
| 1311 | 1311 | { |
|---|
| 1312 | 1312 | /* log */ |
|---|
| 1313 | | ast_log(LOG_ERROR,"No session\n"); |
|---|
| | 1313 | ast_log(LOG_ERROR,"No session [%s]\n",buffer); |
|---|
| 1314 | 1314 | /* Uh? */ |
|---|
| 1315 | 1315 | player->end = 1; |
|---|
| … | … | |
| 1337 | 1337 | if ( (range=GetHeaderValue(buffer,responseLen,"Range")) == 0) |
|---|
| 1338 | 1338 | { |
|---|
| 1339 | | /* log */ |
|---|
| 1340 | | ast_log(LOG_ERROR,"No session\n"); |
|---|
| 1341 | | /* Uh? */ |
|---|
| 1342 | | player->end = 1; |
|---|
| 1343 | | /* break */ |
|---|
| 1344 | | break; |
|---|
| | 1339 | /* No end of stream */ |
|---|
| | 1340 | duration = -1; |
|---|
| | 1341 | } else { |
|---|
| | 1342 | /* Check format */ |
|---|
| | 1343 | if (range=strchr(range,'-')) |
|---|
| | 1344 | /* Get duration */ |
|---|
| | 1345 | duration = atof(range+1)*1000; |
|---|
| | 1346 | else |
|---|
| | 1347 | /* No end of stream */ |
|---|
| | 1348 | duration = -1; |
|---|
| | 1349 | /* Free string */ |
|---|
| | 1350 | free(range); |
|---|
| 1345 | 1351 | } |
|---|
| 1346 | | /* Check format */ |
|---|
| 1347 | | if (range=strchr(range,'-')) |
|---|
| 1348 | | /* Get duration */ |
|---|
| 1349 | | duration = atof(range+1)*1000; |
|---|
| 1350 | | /* Init counter */ |
|---|
| 1351 | | tv = ast_tvnow(); |
|---|
| | 1352 | /* If the video has end */ |
|---|
| | 1353 | if (duration!=-1) |
|---|
| | 1354 | /* Init counter */ |
|---|
| | 1355 | tv = ast_tvnow(); |
|---|
| 1352 | 1356 | /* log */ |
|---|
| 1353 | 1357 | ast_log(LOG_ERROR,"-Started playback [%d]\n",duration); |
|---|
Download in other formats:
|
|