[vlc-commits] demux: avi: wrong signedness & missing proto

Francois Cartegnie git at videolan.org
Fri Apr 18 21:08:36 CEST 2014


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Apr 18 20:58:46 2014 +0200| [b5909c98820e019c2e8dc5364bcf9c79dfd2c10b] | committer: Francois Cartegnie

demux: avi: wrong signedness & missing proto

too fast :/

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

 modules/demux/avi/avi.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/demux/avi/avi.c b/modules/demux/avi/avi.c
index 4f7fbd8..efb7b2e 100644
--- a/modules/demux/avi/avi.c
+++ b/modules/demux/avi/avi.c
@@ -228,6 +228,8 @@ static mtime_t  AVI_MovieGetLength( demux_t * );
 
 static void AVI_MetaLoad( demux_t *, avi_chunk_list_t *p_riff, avi_chunk_avih_t *p_avih );
 
+block_t * ReadFrame( demux_t *p_demux, const avi_track_t *tk, const int i_size );
+
 /*****************************************************************************
  * Stream management
  *****************************************************************************/
@@ -519,7 +521,7 @@ static int Open( vlc_object_t * p_this )
 
                     tk->i_width_bytes = p_vids->p_bih->biWidth * (p_vids->p_bih->biBitCount >> 3);
                     /* RGB DIB are coded from bottom to top */
-                    if ( p_vids->p_bih->biHeight >= 0 ) tk->b_flipped = true;
+                    if ( p_vids->p_bih->biHeight < INT32_MAX ) tk->b_flipped = true;
                 }
                 else
                 {
@@ -540,7 +542,7 @@ static int Open( vlc_object_t * p_this )
                 fmt.video.i_frame_rate_base = tk->i_scale;
 
                  /* Uncompresse Bitmap or YUV, YUV being always topdown */
-                if ( fmt.video.i_height < 0 )
+                if ( fmt.video.i_height > INT32_MAX )
                     fmt.video.i_height =
                         (unsigned int)(-(int)p_vids->p_bih->biHeight);
 



More information about the vlc-commits mailing list