]> git.sesse.net Git - vlc/blobdiff - modules/video_output/directfb.c
Merge commit 'origin/1.0-bugfix'
[vlc] / modules / video_output / directfb.c
index 17876afe5fb9ff5a01742094e8cae83eabaf8bb0..77fa243a4adb2e8a3c7583f00a2a7b7dfbf1f689 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * directfb.c: DirectFB video output display method
  *****************************************************************************
- * Copyright (C) 2005 the VideoLAN team
+ * Copyright (C) 2005-2009 the VideoLAN team
  *
  * Authors: Iuri Diniz <iuri@digizap.com.br>
  *
@@ -65,15 +65,15 @@ struct vout_sys_t
 /*****************************************************************************
  * Module descriptor
  *****************************************************************************/
-vlc_module_begin();
-    set_shortname( "DirectFB" );
-    set_category( CAT_VIDEO );
-    set_subcategory( SUBCAT_VIDEO_VOUT );
-    set_description( N_("DirectFB video output http://www.directfb.org/") );
-    set_capability( "video output", 60 );
-    add_shortcut( "directfb" );
-    set_callbacks( Create, Destroy );
-vlc_module_end();
+vlc_module_begin ()
+    set_shortname( "DirectFB" )
+    set_category( CAT_VIDEO )
+    set_subcategory( SUBCAT_VIDEO_VOUT )
+    set_description( N_("DirectFB video output http://www.directfb.org/") )
+    set_capability( "video output", 60 )
+    add_shortcut( "directfb" )
+    set_callbacks( Create, Destroy )
+vlc_module_end ()
 
 
 static int Create( vlc_object_t *p_this )
@@ -101,6 +101,7 @@ static int Create( vlc_object_t *p_this )
     if( DirectFBInit(NULL,NULL) != DFB_OK )
     {
         msg_Err(p_vout, "Cannot init DirectFB");
+        free( p_sys );
         return VLC_EGENERIC;
     }
 
@@ -139,7 +140,7 @@ static int Init( vout_thread_t *p_vout )
             i_goffset = 2;
             i_blength = 2;
             i_boffset = 0;
-            p_vout->output.i_chroma = VLC_FOURCC('R','G','B','2');
+            p_vout->output.i_chroma = VLC_CODEC_RGB8;
             break;
 
         case DSPF_RGB16:
@@ -151,7 +152,7 @@ static int Init( vout_thread_t *p_vout )
             i_goffset = 5;
             i_blength = 5;
             i_boffset = 0;
-            p_vout->output.i_chroma = VLC_FOURCC('R','V','1','6');
+            p_vout->output.i_chroma = VLC_CODEC_RGB16;
             break;
 
         case DSPF_RGB24:
@@ -163,7 +164,7 @@ static int Init( vout_thread_t *p_vout )
             i_goffset = 8;
             i_blength = 8;
             i_boffset = 0;
-            p_vout->output.i_chroma = VLC_FOURCC('R','V','2','4');
+            p_vout->output.i_chroma = VLC_CODEC_RGB24;
             break;
 
         case DSPF_RGB32:
@@ -175,7 +176,7 @@ static int Init( vout_thread_t *p_vout )
             i_goffset = 8;
             i_blength = 8;
             i_boffset = 0;
-            p_vout->output.i_chroma = VLC_FOURCC('R','V','3','2');
+            p_vout->output.i_chroma = VLC_CODEC_RGB32;
             break;
 
         default: