[vlc-devel] commit: Fixed real frame allocation error path. (Laurent Aimar )

git version control git at videolan.org
Sun Dec 14 17:19:28 CET 2008


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sun Dec 14 16:52:34 2008 +0100| [910e28a178347d3ba913e503365184a21fa16ce2] | committer: Laurent Aimar 

Fixed real frame allocation error path.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=910e28a178347d3ba913e503365184a21fa16ce2
---

 modules/demux/real.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/modules/demux/real.c b/modules/demux/real.c
index c48fcbe..a9a4597 100644
--- a/modules/demux/real.c
+++ b/modules/demux/real.c
@@ -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;
 
         /* */




More information about the vlc-devel mailing list