Commit 246d92bc authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

input: fix forward NULL

(cherry picked from commit dd6170364ffa7a6cc2248f2ef8b1f98e25f95589)
parent 60b89fc3
...@@ -530,9 +530,13 @@ static void UpdateBookmarksOption( input_thread_t *p_input ) ...@@ -530,9 +530,13 @@ static void UpdateBookmarksOption( input_thread_t *p_input )
} }
char *psz_value = malloc( i_len + p_input->p->i_bookmark + 1 ); char *psz_value = malloc( i_len + p_input->p->i_bookmark + 1 );
char *psz_next = psz_value;
psz_next += sprintf( psz_next, "bookmarks=" ); if( psz_value != NULL )
{
strcpy( psz_value, "bookmarks=" );
char *psz_next = psz_value + strlen( "bookmarks" );
for( int i = 0; i < p_input->p->i_bookmark && psz_value != NULL; i++ ) for( int i = 0; i < p_input->p->i_bookmark && psz_value != NULL; i++ )
{ {
const seekpoint_t *p_bookmark = p_input->p->pp_bookmark[i]; const seekpoint_t *p_bookmark = p_input->p->pp_bookmark[i];
...@@ -545,13 +549,15 @@ static void UpdateBookmarksOption( input_thread_t *p_input ) ...@@ -545,13 +549,15 @@ static void UpdateBookmarksOption( input_thread_t *p_input )
if( i < p_input->p->i_bookmark - 1) if( i < p_input->p->i_bookmark - 1)
*psz_next++ = ','; *psz_next++ = ',';
} }
}
vlc_mutex_unlock( &p_input->p->p_item->lock ); vlc_mutex_unlock( &p_input->p->p_item->lock );
if( psz_value ) if( psz_value != NULL )
input_item_AddOption( p_input->p->p_item, psz_value, VLC_INPUT_OPTION_UNIQUE ); {
input_item_AddOption( p_input->p->p_item, psz_value,
VLC_INPUT_OPTION_UNIQUE );
free( psz_value ); free( psz_value );
}
input_SendEventBookmark( p_input ); input_SendEventBookmark( p_input );
} }
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