Commit 6db69bfe authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

* Fix reference modules to add after their own playlist position instead of the end of the playlist

parent d6c80f22
...@@ -343,6 +343,7 @@ static int Open( vlc_object_t * p_this ) ...@@ -343,6 +343,7 @@ static int Open( vlc_object_t * p_this )
MP4_Box_t *p_rdrf = MP4_BoxGet( p_rmra, "rmda[%d]/rdrf", i ); MP4_Box_t *p_rdrf = MP4_BoxGet( p_rmra, "rmda[%d]/rdrf", i );
char *psz_ref; char *psz_ref;
uint32_t i_ref_type; uint32_t i_ref_type;
int i_position = p_playlist->i_index;
if( !p_rdrf || !( psz_ref = p_rdrf->data.p_rdrf->psz_ref ) ) if( !p_rdrf || !( psz_ref = p_rdrf->data.p_rdrf->psz_ref ) )
{ {
...@@ -365,7 +366,7 @@ static int Open( vlc_object_t * p_this ) ...@@ -365,7 +366,7 @@ static int Open( vlc_object_t * p_this )
{ {
msg_Dbg( p_demux, "adding ref = `%s'", psz_ref ); msg_Dbg( p_demux, "adding ref = `%s'", psz_ref );
playlist_Add( p_playlist, psz_ref, psz_ref, playlist_Add( p_playlist, psz_ref, psz_ref,
PLAYLIST_APPEND, PLAYLIST_END ); PLAYLIST_APPEND, i_position );
} }
else else
{ {
...@@ -388,7 +389,7 @@ static int Open( vlc_object_t * p_this ) ...@@ -388,7 +389,7 @@ static int Open( vlc_object_t * p_this )
strcat( psz_absolute, psz_ref ); strcat( psz_absolute, psz_ref );
msg_Dbg( p_demux, "adding ref = `%s'", psz_absolute ); msg_Dbg( p_demux, "adding ref = `%s'", psz_absolute );
playlist_Add( p_playlist, psz_absolute, psz_absolute, playlist_Add( p_playlist, psz_absolute, psz_absolute,
PLAYLIST_APPEND, PLAYLIST_END ); PLAYLIST_APPEND, i_position );
} }
} }
else else
......
...@@ -445,10 +445,9 @@ static void Run( intf_thread_t *p_intf ) ...@@ -445,10 +445,9 @@ static void Run( intf_thread_t *p_intf )
int i_pos = playlist_GetPositionById( p_playlist, int i_pos = playlist_GetPositionById( p_playlist,
p_intf->p_sys->pp_announces[i]->i_id ); p_intf->p_sys->pp_announces[i]->i_id );
playlist_Delete( p_playlist, i_pos ); playlist_Delete( p_playlist, i_pos );
vlc_object_release( p_playlist );
} }
vlc_object_release( p_playlist );
/* Free the p_announce */ /* Free the p_announce */
p_announce = p_intf->p_sys->pp_announces[i]; p_announce = p_intf->p_sys->pp_announces[i];
if( p_announce->psz_name ) if( p_announce->psz_name )
...@@ -987,7 +986,7 @@ static sess_descr_t * parse_sdp( vlc_object_t * p_parent, char *p_packet ) ...@@ -987,7 +986,7 @@ static sess_descr_t * parse_sdp( vlc_object_t * p_parent, char *p_packet )
char *psz_end; char *psz_end;
/* Search begin of field */ /* Search begin of field */
while( *p_packet == '\n' || *p_packet == ' ' || *p_packet == '\t' ) while( *p_packet == '\r' || *p_packet == '\n' || *p_packet == ' ' || *p_packet == '\t' )
{ {
p_packet++; p_packet++;
} }
...@@ -1241,7 +1240,7 @@ static int Demux( demux_t *p_demux ) ...@@ -1241,7 +1240,7 @@ static int Demux( demux_t *p_demux )
} }
p_playlist->pp_items[p_playlist->i_index]->b_autodeletion = VLC_TRUE; p_playlist->pp_items[p_playlist->i_index]->b_autodeletion = VLC_TRUE;
i_position = p_playlist->i_index + 1; i_position = p_playlist->i_index;
/* Gather the complete sdp file */ /* Gather the complete sdp file */
for( ;; ) for( ;; )
...@@ -1287,6 +1286,7 @@ static int Demux( demux_t *p_demux ) ...@@ -1287,6 +1286,7 @@ static int Demux( demux_t *p_demux )
i_id = playlist_Add( p_playlist, psz_uri, p_sd->psz_sessionname , i_id = playlist_Add( p_playlist, psz_uri, p_sd->psz_sessionname ,
PLAYLIST_CHECK_INSERT, i_position ); PLAYLIST_CHECK_INSERT, i_position );
free( psz_uri ); free( psz_uri );
vlc_object_release( p_playlist );
return 0; return 0;
} }
...@@ -1303,6 +1303,7 @@ static int Demux( demux_t *p_demux ) ...@@ -1303,6 +1303,7 @@ static int Demux( demux_t *p_demux )
if( !p_sd->pp_media[i_count] ) if( !p_sd->pp_media[i_count] )
{ {
vlc_object_release( p_playlist );
return -1; return -1;
} }
...@@ -1311,6 +1312,7 @@ static int Demux( demux_t *p_demux ) ...@@ -1311,6 +1312,7 @@ static int Demux( demux_t *p_demux )
if( !psz_proto || !psz_port ) if( !psz_proto || !psz_port )
{ {
vlc_object_release( p_playlist );
return -1; return -1;
} }
...@@ -1326,6 +1328,7 @@ static int Demux( demux_t *p_demux ) ...@@ -1326,6 +1328,7 @@ static int Demux( demux_t *p_demux )
if( psz_uri == NULL ) if( psz_uri == NULL )
{ {
vlc_object_release( p_playlist );
return -1; return -1;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment