]> git.sesse.net Git - vlc/commitdiff
Fixed real frame allocation error path.
authorLaurent Aimar <fenrir@videolan.org>
Sun, 14 Dec 2008 15:52:34 +0000 (16:52 +0100)
committerLaurent Aimar <fenrir@videolan.org>
Sun, 14 Dec 2008 16:18:59 +0000 (17:18 +0100)
modules/demux/real.c

index c48fcbe8cde4270125ce0bf881022ed0277c5d64..a9a45974a809765d6c6cf648bbc7b7570a01269f 100644 (file)
@@ -542,8 +542,7 @@ static void DemuxVideo( demux_t *p_demux, real_track_t *tk, mtime_t i_dts, unsig
             tk->p_frame = block_New( p_demux, tk->i_frame_size );
             if( !tk->p_frame )
             {
-                tk->i_frame_slice = 0;
-                tk->i_frame_slice_count = 0;
+                tk->i_frame_size = 0;
                 return;
             }
 
@@ -571,7 +570,7 @@ static void DemuxVideo( demux_t *p_demux, real_track_t *tk, mtime_t i_dts, unsig
 
         /* */
         tk->i_frame_slice++;
-        if( tk->i_frame_slice > tk->i_frame_slice_count )
+        if( tk->i_frame_slice > tk->i_frame_slice_count || !tk->p_frame )
             break;
 
         /* */