Changeset d58fbdad0e5332b948ccac1f796df27872959d45
- Timestamp:
- 22/04/08 16:10:52
(7 months ago)
- Author:
- Jean-Paul Saman <jean-paul.saman@m2x.nl>
- git-committer:
- Jean-Paul Saman <jean-paul.saman@m2x.nl> 1208873452 +0200
- git-parent:
[afb9691c93dc4f1d59d15c661ac92f06aa634fe9]
- git-author:
- Jean-Paul Saman <jean-paul.saman@m2x.nl> 1208436773 +0200
- Message:
Rework to use asprintf() in live555 demux
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r4dbeeda |
rd58fbda |
|
| 458 | 458 | demux_sys_t *p_sys = p_demux->p_sys; |
|---|
| 459 | 459 | Authenticator authenticator; |
|---|
| 460 | | bool b_firstpass = true; |
|---|
| 461 | | |
|---|
| | 460 | bool b_firstpass = true; |
|---|
| 462 | 461 | char *psz_user = NULL; |
|---|
| 463 | 462 | char *psz_pwd = NULL; |
|---|
| … | … | |
| 467 | 466 | int i_http_port = 0; |
|---|
| 468 | 467 | int i_ret = VLC_SUCCESS; |
|---|
| 469 | | |
|---|
| 470 | | psz_url = (char*)malloc( strlen( p_sys->psz_path ) + 8 ); |
|---|
| 471 | | if( !psz_url ) return VLC_ENOMEM; |
|---|
| | 468 | int i_lefttries; |
|---|
| 472 | 469 | |
|---|
| 473 | 470 | if( p_sys->url.i_port == 0 ) p_sys->url.i_port = 554; |
|---|
| 474 | 471 | if( p_sys->url.psz_username || p_sys->url.psz_password ) |
|---|
| 475 | 472 | { |
|---|
| 476 | | sprintf( psz_url, "rtsp://%s:%d%s", p_sys->url.psz_host, |
|---|
| 477 | | p_sys->url.i_port, p_sys->url.psz_path ); |
|---|
| | 473 | int err; |
|---|
| | 474 | err = asprintf( &psz_url, "rtsp://%s:%d%s", p_sys->url.psz_host, |
|---|
| | 475 | p_sys->url.i_port, p_sys->url.psz_path ); |
|---|
| | 476 | if( err == -1 ) return VLC_ENOMEM; |
|---|
| 478 | 477 | |
|---|
| 479 | 478 | psz_user = strdup( p_sys->url.psz_username ); |
|---|
| … | … | |
| 482 | 481 | else |
|---|
| 483 | 482 | { |
|---|
| 484 | | sprintf( psz_url, "rtsp://%s", p_sys->psz_path ); |
|---|
| | 483 | int err; |
|---|
| | 484 | err = asprintf( &psz_url, "rtsp://%s", p_sys->psz_path ); |
|---|
| | 485 | if( err == -1 ) return VLC_ENOMEM; |
|---|
| 485 | 486 | |
|---|
| 486 | 487 | psz_user = var_CreateGetString( p_demux, "rtsp-user" ); |
|---|
| … | … | |
| 488 | 489 | } |
|---|
| 489 | 490 | |
|---|
| 490 | | int i_lefttries = 3; |
|---|
| | 491 | i_lefttries = 3; |
|---|
| 491 | 492 | createnew: |
|---|
| 492 | 493 | i_lefttries--; |
|---|