]> git.sesse.net Git - vlc/blobdiff - modules/access/dc1394.c
Replaced vout_InitPicture/Format with their equivalent.
[vlc] / modules / access / dc1394.c
index ab2cd1d42450dc16dda98e5f28b86886eeff6aca..b79d38a50549071a892b11364812107e801a3c7b 100644 (file)
@@ -33,7 +33,6 @@
 #include <vlc_common.h>
 #include <vlc_plugin.h>
 #include <vlc_input.h>
-#include <vlc_vout.h>
 #include <vlc_demux.h>
 
 
@@ -215,7 +214,6 @@ static int Open( vlc_object_t *p_this )
     int i;
     int i_width;
     int i_height;
-    int i_aspect;
     int result = 0;
 
     if( strncmp(p_demux->psz_access, "dc1394", 6) != 0 )
@@ -477,10 +475,14 @@ static int Open( vlc_object_t *p_this )
     i_width = p_sys->camera.frame_width;
     i_height = p_sys->camera.frame_height;
 
-    i_aspect = vout_InitPicture( VLC_OBJECT(p_demux), &p_sys->pic,
-                    VLC_CODEC_UYVY,
-                    i_width, i_height,
-                    i_width * VOUT_ASPECT_FACTOR / i_height );
+    if( picture_Setup( &p_sys->pic, VLC_CODEC_UYVY,
+                       i_width, i_height,
+                       i_width * VOUT_ASPECT_FACTOR / i_height ) )
+    {
+        msg_Err( p_demux ,"unknown chroma" );
+        Close( p_this );
+        return VLC_EGENERIC;
+    }
 
     es_format_Init( &fmt, VIDEO_ES, VLC_CODEC_UYVY );