Changeset 956087a83e8ff3653bcc2b87340a593bad6388ab
- Timestamp:
- 06/07/06 22:43:21
(2 years ago)
- Author:
- Derk-Jan Hartman <hartman@videolan.org>
- git-committer:
- Derk-Jan Hartman <hartman@videolan.org> 1152218601 +0000
- git-parent:
[c158aecdaf63c3b1490e04147915c32425cd4d3b]
- git-author:
- Derk-Jan Hartman <hartman@videolan.org> 1152218601 +0000
- Message:
* Fix SDP file parsing of the SAP module.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r4ec4955 |
r956087a |
|
| 412 | 412 | p_demux->pf_demux = Demux; |
|---|
| 413 | 413 | |
|---|
| 414 | | free( psz_sdp ); |
|---|
| | 414 | FREE( psz_sdp ); |
|---|
| 415 | 415 | return VLC_SUCCESS; |
|---|
| 416 | 416 | |
|---|
| 417 | 417 | error: |
|---|
| 418 | | free( psz_sdp ); |
|---|
| 419 | | if( p_sdp ) FreeSDP( p_sdp ); |
|---|
| | 418 | FREE( psz_sdp ); |
|---|
| | 419 | if( p_sdp ) FreeSDP( p_sdp ); p_sdp = NULL; |
|---|
| 420 | 420 | stream_Seek( p_demux->s, 0 ); |
|---|
| 421 | 421 | return VLC_EGENERIC; |
|---|
| … | … | |
| 471 | 471 | if( p_demux->p_sys ) |
|---|
| 472 | 472 | { |
|---|
| 473 | | if( p_demux->p_sys->p_sdp ) FreeSDP( p_demux->p_sys->p_sdp ); |
|---|
| | 473 | if( p_demux->p_sys->p_sdp ) { FreeSDP( p_demux->p_sys->p_sdp ); p_demux->p_sys->p_sdp = NULL; } |
|---|
| 474 | 474 | free( p_demux->p_sys ); |
|---|
| 475 | 475 | } |
|---|
| … | … | |
| 572 | 572 | sdp_t *p_sdp = p_demux->p_sys->p_sdp; |
|---|
| 573 | 573 | playlist_t *p_playlist; |
|---|
| | 574 | input_thread_t *p_input; |
|---|
| | 575 | input_item_t *p_parent_input; |
|---|
| 574 | 576 | |
|---|
| 575 | 577 | p_playlist = (playlist_t *)vlc_object_find( p_demux, VLC_OBJECT_PLAYLIST, |
|---|
| 576 | 578 | FIND_ANYWHERE ); |
|---|
| 577 | | |
|---|
| 578 | | /* TODO FIXME !! Add at the correct place */ |
|---|
| 579 | | playlist_PlaylistAdd( p_playlist, p_sdp->psz_uri, EnsureUTF8( p_sdp->psz_sessionname ), |
|---|
| 580 | | PLAYLIST_APPEND, PLAYLIST_END ); |
|---|
| 581 | | |
|---|
| | 579 | if( !p_playlist ) |
|---|
| | 580 | { |
|---|
| | 581 | msg_Err( p_demux, "playlist could not be found" ); |
|---|
| | 582 | return VLC_EGENERIC; |
|---|
| | 583 | } |
|---|
| | 584 | |
|---|
| | 585 | p_input = (input_thread_t *)vlc_object_find( p_demux, VLC_OBJECT_INPUT, |
|---|
| | 586 | FIND_PARENT ); |
|---|
| | 587 | if( !p_input ) |
|---|
| | 588 | { |
|---|
| | 589 | msg_Err( p_demux, "parent input could not be found" ); |
|---|
| | 590 | return VLC_EGENERIC; |
|---|
| | 591 | } |
|---|
| | 592 | |
|---|
| | 593 | p_parent_input = p_input->input.p_item; |
|---|
| | 594 | |
|---|
| | 595 | vlc_mutex_lock( &p_parent_input->lock ); |
|---|
| | 596 | FREE( p_parent_input->psz_uri ); |
|---|
| | 597 | p_parent_input->psz_uri = strdup( p_sdp->psz_uri ); |
|---|
| | 598 | FREE( p_parent_input->psz_name ); |
|---|
| | 599 | p_parent_input->psz_name = strdup( EnsureUTF8( p_sdp->psz_sessionname ) ); |
|---|
| | 600 | p_parent_input->i_type = ITEM_TYPE_NET; |
|---|
| | 601 | |
|---|
| | 602 | if( p_playlist->status.p_item && |
|---|
| | 603 | p_playlist->status.p_item->p_input == p_parent_input ) |
|---|
| | 604 | { |
|---|
| | 605 | playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, |
|---|
| | 606 | p_playlist->status.p_node, p_playlist->status.p_item ); |
|---|
| | 607 | } |
|---|
| | 608 | |
|---|
| | 609 | vlc_mutex_unlock( &p_parent_input->lock ); |
|---|
| | 610 | vlc_object_release( p_input ); |
|---|
| 582 | 611 | vlc_object_release( p_playlist ); |
|---|
| 583 | | if( p_sdp ) FreeSDP( p_sdp ); |
|---|
| 584 | 612 | |
|---|
| 585 | 613 | return VLC_SUCCESS; |
|---|
| … | … | |
| 763 | 791 | p_sd->p_sys->pp_announces[i]->i_last = mdate(); |
|---|
| 764 | 792 | } |
|---|
| 765 | | FreeSDP( p_sdp ); |
|---|
| | 793 | FreeSDP( p_sdp ); p_sdp = NULL; |
|---|
| 766 | 794 | return VLC_SUCCESS; |
|---|
| 767 | 795 | } |
|---|
| … | … | |
| 1129 | 1157 | { |
|---|
| 1130 | 1158 | msg_Warn( p_obj, "invalid packet" ) ; |
|---|
| 1131 | | FreeSDP( p_sdp ); |
|---|
| | 1159 | FreeSDP( p_sdp ); p_sdp = NULL; |
|---|
| 1132 | 1160 | return NULL; |
|---|
| 1133 | 1161 | } |
|---|
| … | … | |
| 1241 | 1269 | if( b_invalid ) |
|---|
| 1242 | 1270 | { |
|---|
| 1243 | | FreeSDP( p_sdp ); |
|---|
| | 1271 | FreeSDP( p_sdp ); p_sdp = NULL; |
|---|
| 1244 | 1272 | return NULL; |
|---|
| 1245 | 1273 | } |
|---|
| … | … | |
| 1339 | 1367 | FREE( p_attr ); |
|---|
| 1340 | 1368 | } |
|---|
| 1341 | | free( p_sdp ); |
|---|
| | 1369 | FREE( p_sdp ); |
|---|
| 1342 | 1370 | } |
|---|
| 1343 | 1371 | |
|---|
| … | … | |
| 1347 | 1375 | int i; |
|---|
| 1348 | 1376 | |
|---|
| 1349 | | if( p_announce->p_sdp ) FreeSDP( p_announce->p_sdp ); |
|---|
| | 1377 | if( p_announce->p_sdp ) |
|---|
| | 1378 | { |
|---|
| | 1379 | FreeSDP( p_announce->p_sdp ); |
|---|
| | 1380 | p_announce->p_sdp = NULL; |
|---|
| | 1381 | } |
|---|
| 1350 | 1382 | |
|---|
| 1351 | 1383 | if( p_announce->i_input_id > -1 ) |
|---|