]> git.sesse.net Git - vlc/commitdiff
livehttp: don't remove segment-count to be less than number of segments requested
authorIlkka Ollakka <ileoo@videolan.org>
Thu, 2 May 2013 17:58:02 +0000 (20:58 +0300)
committerIlkka Ollakka <ileoo@videolan.org>
Thu, 2 May 2013 18:36:02 +0000 (21:36 +0300)
modules/access_output/livehttp.c

index 4a45cfd7160be9adf4dad6e8ba43584f779fdac0..2300a74417bbbdd4a499194fa779d379d019ff97 100644 (file)
@@ -603,7 +603,7 @@ static int updateIndexAndDel( sout_access_out_t *p_access, sout_access_out_sys_t
     }
 
     // Then take care of deletion
-    while( p_sys->b_delsegs && p_sys->i_numsegs && ( (vlc_array_count( p_sys->segments_t ) ) >= p_sys->i_numsegs ) )
+    while( p_sys->b_delsegs && p_sys->i_numsegs && ( (vlc_array_count( p_sys->segments_t ) ) > p_sys->i_numsegs ) )
     {
          output_segment_t *segment = vlc_array_item_at_index( p_sys->segments_t, 0 );
          vlc_array_remove( p_sys->segments_t, 0 );