PlaylistRebuild( p_intf );
var_AddCallback( p_playlist, "intf-change", PlaylistChanged, p_intf );
var_AddCallback( p_playlist, "playlist-item-append", PlaylistChanged, p_intf );
- var_AddCallback( p_playlist, "item-change", PlaylistChanged, p_intf );
while( vlc_object_alive( p_intf ) )
{
}
var_DelCallback( p_playlist, "intf-change", PlaylistChanged, p_intf );
var_DelCallback( p_playlist, "playlist-item-append", PlaylistChanged, p_intf );
- var_DelCallback( p_playlist, "item-change", PlaylistChanged, p_intf );
vlc_restorecancel( canc );
}
#define ReturnTrue \
do { \
- vlc_object_release( p_playlist ); \
+ pl_Release( p_intf ); \
return 1; \
} while(0)
#define ReturnFalse \
do { \
- vlc_object_release( p_playlist ); \
+ pl_Release( p_intf ); \
return 0; \
} while(0)
case '[':
if( p_sys->p_input )
- {
- val.b_bool = true;
- var_Set( p_sys->p_input, "prev-title", val );
- }
+ var_SetVoid( p_sys->p_input, "prev-title" );
ReturnTrue;
case ']':
if( p_sys->p_input )
- {
- val.b_bool = true;
- var_Set( p_sys->p_input, "next-title", val );
- }
+ var_SetVoid( p_sys->p_input, "next-title" );
ReturnTrue;
case '<':
if( p_sys->p_input )
- {
- val.b_bool = true;
- var_Set( p_sys->p_input, "prev-chapter", val );
- }
+ var_SetVoid( p_sys->p_input, "prev-chapter" );
ReturnTrue;
case '>':
if( p_sys->p_input )
- {
- val.b_bool = true;
- var_Set( p_sys->p_input, "next-chapter", val );
- }
+ var_SetVoid( p_sys->p_input, "next-chapter" );
ReturnTrue;
case 'p':
SHOW_ACS( 1, ACS_VLINE ); l++;
MainBoxWrite( p_intf, l, 1, _("| demux bitrate : %6.0f kb/s"),
(float)(p_item->p_stats->f_demux_bitrate)*8000 );
- SHOW_ACS( 1, ACS_VLINE ); l++; SHOW_ACS( 1, ACS_VLINE ); l++;
+ SHOW_ACS( 1, ACS_VLINE ); l++;
+ DrawEmptyLine( p_sys->w, p_sys->i_box_y + l - p_sys->i_box_start, 1, COLS - 2 );
+ SHOW_ACS( 1, ACS_VLINE ); l++;
/* Video */
if( i_video )
SHOW_ACS( 1, ACS_VLINE ); l++;
MainBoxWrite( p_intf, l, 1, _("| frames lost : %5i"),
p_item->p_stats->i_lost_pictures );
- SHOW_ACS( 1, ACS_VLINE ); l++; SHOW_ACS( 1, ACS_VLINE ); l++;
+ SHOW_ACS( 1, ACS_VLINE ); l++;
+ DrawEmptyLine( p_sys->w, p_sys->i_box_y + l - p_sys->i_box_start, 1, COLS - 2 );
+ SHOW_ACS( 1, ACS_VLINE ); l++;
}
/* Audio*/
if( i_audio )
SHOW_ACS( 1, ACS_VLINE ); l++;
MainBoxWrite( p_intf, l, 1, _("| buffers lost : %5i"),
p_item->p_stats->i_lost_abuffers );
- SHOW_ACS( 1, ACS_VLINE ); l++; SHOW_ACS( 1, ACS_VLINE ); l++;
+ SHOW_ACS( 1, ACS_VLINE ); l++;
+ DrawEmptyLine( p_sys->w, p_sys->i_box_y + l - p_sys->i_box_start, 1, COLS - 2 );
+ SHOW_ACS( 1, ACS_VLINE ); l++;
}
/* Sout */
if( p_sys->b_color ) wcolor_set( p_sys->w, C_CATEGORY, NULL );
c = '>';
PL_UNLOCK;
+ if( p_input2 )
+ vlc_object_release( p_input2 );
+
if( y >= y_end ) break;
if( b_selected )
{
refresh();
*t_last_refresh = time( 0 );
- vlc_object_release( p_playlist );
+ pl_Release( p_intf );
}
static playlist_item_t *PlaylistGetRoot( intf_thread_t *p_intf )
default:
p_item = p_playlist->p_root_onelevel;
}
- vlc_object_release( p_playlist );
+ pl_Release( p_intf );
return p_item;
}
PL_UNLOCK;
- vlc_object_release( p_playlist );
+ pl_Release( p_intf );
}
static void PlaylistAddNode( intf_thread_t *p_intf, playlist_item_t *p_node,
playlist_t *p_playlist = pl_Hold( p_intf );
p_intf->p_sys->b_need_update = true;
p_intf->p_sys->p_node = playlist_CurrentPlayingItem(p_playlist) ? playlist_CurrentPlayingItem(p_playlist)->p_parent : NULL;
- vlc_object_release( p_playlist );
+ pl_Release( p_intf );
return VLC_SUCCESS;
}
if( playlist_CurrentPlayingItem(p_playlist) == NULL )
{
PL_UNLOCK;
- vlc_object_release( p_playlist );
+ pl_Release( p_intf );
return;
}
if( psz_device == NULL )
{
+ pl_Release( p_intf );
return;
}
}
free( psz_device );
- vlc_object_release( p_playlist );
+ pl_Release( p_intf );
return;
}
continue;
}
- asprintf( &psz_uri, "%s/%s", p_sys->psz_current_dir, psz_entry );
+ if( asprintf( &psz_uri, "%s/%s", p_sys->psz_current_dir,
+ psz_entry ) == -1)
+ {
+ free( psz_entry );
+ continue;
+ }
if( !( p_dir_entry = malloc( sizeof( struct dir_entry_t) ) ) )
{
else
playlist_Play( p_playlist );
- vlc_object_release( p_playlist );
+ pl_Release( p_intf );
}
/****************************************************************************