Changeset a87063e35f7d36c9053951a0a58be5a61ffca082
- Timestamp:
- 11/02/07 21:37:19
(2 years ago)
- Author:
- Rémi Denis-Courmont <rem@videolan.org>
- git-committer:
- Rémi Denis-Courmont <rem@videolan.org> 1171226239 +0000
- git-parent:
[65f5f148fff62fef60b0e96e1ecde3694b674caf]
- git-author:
- Rémi Denis-Courmont <rem@videolan.org> 1171226239 +0000
- Message:
Fix SAP parser (again)
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r14fb31d |
ra87063e |
|
| 394 | 394 | } |
|---|
| 395 | 395 | |
|---|
| 396 | | if( p_sdp->mediac > 1 ) |
|---|
| 397 | | { |
|---|
| 398 | | goto error; |
|---|
| 399 | | } |
|---|
| 400 | | |
|---|
| 401 | 396 | if( ParseConnection( VLC_OBJECT( p_demux ), p_sdp ) ) |
|---|
| 402 | 397 | { |
|---|
| … | … | |
| 707 | 702 | |
|---|
| 708 | 703 | if( p_sdp == NULL ) |
|---|
| 709 | | { |
|---|
| 710 | 704 | return VLC_EGENERIC; |
|---|
| 711 | | } |
|---|
| 712 | 705 | |
|---|
| 713 | 706 | /* Decide whether we should add a playlist item for this SDP */ |
|---|
| 714 | 707 | /* Parse connection information (c= & m= ) */ |
|---|
| 715 | 708 | if( ParseConnection( VLC_OBJECT(p_sd), p_sdp ) ) |
|---|
| 716 | | { |
|---|
| 717 | 709 | p_sdp->psz_uri = NULL; |
|---|
| 718 | | } |
|---|
| 719 | 710 | |
|---|
| 720 | 711 | /* Multi-media or no-parse -> pass to LIVE.COM */ |
|---|
| 721 | | if( p_sdp->mediac > 1 || ( p_sdp->i_media_type != 14 && |
|---|
| 722 | | p_sdp->i_media_type != 32 && |
|---|
| 723 | | p_sdp->i_media_type != 33) || |
|---|
| 724 | | p_sd->p_sys->b_parse == VLC_FALSE ) |
|---|
| 725 | | { |
|---|
| 726 | | if( p_sdp->psz_uri ) free( p_sdp->psz_uri ); |
|---|
| 727 | | asprintf( &p_sdp->psz_uri, "sdp://%s", p_sdp->psz_sdp ); |
|---|
| | 712 | if( ( p_sdp->i_media_type != 14 |
|---|
| | 713 | && p_sdp->i_media_type != 32 |
|---|
| | 714 | && p_sdp->i_media_type != 33) |
|---|
| | 715 | || p_sd->p_sys->b_parse == VLC_FALSE ) |
|---|
| | 716 | { |
|---|
| | 717 | free( p_sdp->psz_uri ); |
|---|
| | 718 | if (asprintf( &p_sdp->psz_uri, "sdp://%s", p_sdp->psz_sdp ) == -1) |
|---|
| | 719 | p_sdp->psz_uri = NULL; |
|---|
| 728 | 720 | } |
|---|
| 729 | 721 | |
|---|
| … | … | |
| 1187 | 1179 | goto error; |
|---|
| 1188 | 1180 | } |
|---|
| 1189 | | int port = atoi (data); |
|---|
| | 1181 | int port = atoi (++data); |
|---|
| 1190 | 1182 | if (port <= 0 || port >= 65536) |
|---|
| 1191 | 1183 | { |
|---|
| … | … | |
| 1201 | 1193 | goto error; |
|---|
| 1202 | 1194 | } |
|---|
| 1203 | | m->fmt = strdup (data); |
|---|
| | 1195 | m->fmt = strdup (++data); |
|---|
| 1204 | 1196 | if (m->fmt == NULL) |
|---|
| 1205 | 1197 | goto error; |
|---|