Commit d9c624c0 authored by Ilkka Ollakka's avatar Ilkka Ollakka

livehttp: remove leftover segments if delsegs is on

Also check if i_numsegs is setted as delsegs is tru by default
and we don't want to cause suprises to people creating VOD-stuff.
parent e5536cc3
......@@ -781,6 +781,12 @@ static void Close( vlc_object_t * p_this )
{
output_segment_t *segment = vlc_array_item_at_index( p_sys->segments_t, 0 );
vlc_array_remove( p_sys->segments_t, 0 );
if( p_sys->b_delsegs && p_sys->i_numsegs && segment->psz_filename )
{
msg_Dbg( p_access, "Removing segment number %d name %s", segment->i_segment_number, segment->psz_filename );
vlc_unlink( segment->psz_filename );
}
destroySegment( segment );
}
vlc_array_destroy( p_sys->segments_t );
......
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