Commit 92d104ad authored by Laurent Aimar's avatar Laurent Aimar Committed by Rémi Duraffort

Fixed potential use of non initialized fourcc in rawvideo demuxer.

It could happen when the demuxer was forced.
(cherry picked from commit ba6c81ac)
Signed-off-by: default avatarRémi Duraffort <ivoire@videolan.org>
parent 18739413
...@@ -131,7 +131,7 @@ static int Open( vlc_object_t * p_this ) ...@@ -131,7 +131,7 @@ static int Open( vlc_object_t * p_this )
int i_width=-1, i_height=-1; int i_width=-1, i_height=-1;
unsigned u_fps_num=0, u_fps_den=1; unsigned u_fps_num=0, u_fps_den=1;
char *psz_ext; char *psz_ext;
vlc_fourcc_t i_chroma; vlc_fourcc_t i_chroma = 0;
unsigned int i_sar_num = 0; unsigned int i_sar_num = 0;
unsigned int i_sar_den = 0; unsigned int i_sar_den = 0;
const struct preset_t *p_preset = NULL; const struct preset_t *p_preset = NULL;
...@@ -350,6 +350,12 @@ static int Open( vlc_object_t * p_this ) ...@@ -350,6 +350,12 @@ static int Open( vlc_object_t * p_this )
goto error; goto error;
} }
if( i_chroma == 0 )
{
msg_Err( p_demux, "invalid or no chroma specified." );
goto error;
}
/* fixup anything missing with sensible assumptions */ /* fixup anything missing with sensible assumptions */
if( i_sar_num <= 0 || i_sar_den <= 0 ) if( i_sar_num <= 0 || i_sar_den <= 0 )
{ {
......
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