Commit ba6c81ac authored by Laurent Aimar's avatar Laurent Aimar

Fixed potential use of non initialized fourcc in rawvideo demuxer.

It could happen when the demuxer was forced.
parent b62d7ff5
...@@ -130,7 +130,7 @@ static int Open( vlc_object_t * p_this ) ...@@ -130,7 +130,7 @@ static int Open( vlc_object_t * p_this )
demux_sys_t *p_sys; demux_sys_t *p_sys;
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;
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;
...@@ -352,6 +352,12 @@ valid: ...@@ -352,6 +352,12 @@ valid:
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