]> git.sesse.net Git - vlc/blobdiff - modules/demux/rawvid.c
Improved time managment and seeking in our avformat wrapper.
[vlc] / modules / demux / rawvid.c
index b1558c9b943366321cb7f60202b930276a8b1b08..82e4daaa38458e2087250f489d308bb4414c44ad 100644 (file)
@@ -130,7 +130,7 @@ static int Open( vlc_object_t * p_this )
     demux_sys_t *p_sys;
     int i_width=-1, i_height=-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_den = 0;
     const struct preset_t *p_preset = NULL;
@@ -352,6 +352,12 @@ valid:
         goto error;
     }
 
+    if( i_chroma == 0 )
+    {
+        msg_Err( p_demux, "invalid or no chroma specified." );
+        goto error;
+    }
+
     /* fixup anything missing with sensible assumptions */
     if( i_sar_num <= 0 || i_sar_den <= 0 )
     {