]> git.sesse.net Git - vlc/blobdiff - modules/codec/quicktime.c
Keep behavior same as it was before aspect-ratio fix - the safe, conservative
[vlc] / modules / codec / quicktime.c
index 1ae9305f1e7f7c6e0bd8209b5a384c560a1686b9..edb611d201f9a4bd54c9933115bda602e6a9951a 100644 (file)
@@ -2,7 +2,7 @@
  * quicktime.c: a quicktime decoder that uses the QT library/dll
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: quicktime.c,v 1.18 2003/11/23 13:25:32 gbazin Exp $
+ * $Id$
  *
  * Authors: Laurent Aimar <fenrir at via.ecp.fr>
  *          Derk-Jan Hartman <thedj at users.sf.net>
@@ -58,6 +58,8 @@ static void Close( vlc_object_t * );
 vlc_module_begin();
     set_description( _("QuickTime library decoder") );
     set_capability( "decoder", 10 );
+    set_category( CAT_INPUT );
+    set_subcategory( SUBCAT_INPUT_VCODEC );
     set_callbacks( Open, Close );
 
     /* create a mutex */
@@ -134,6 +136,7 @@ struct decoder_sys_t
     unsigned int    InFrameSize;
     unsigned int    OutFrameSize;
 
+#ifndef WIN32
     /* Video */
     Component         (*FindNextComponent)
         ( Component prev, ComponentDescription* desc );
@@ -172,7 +175,7 @@ struct decoder_sys_t
 
     CodecDecompressParams   decpar;          /* for ImageCodecPreDecompress()*/
     CodecCapabilities       codeccap;        /* for decpar */
-
+#endif
 
     /* Output properties */
     uint8_t *           plane;
@@ -373,7 +376,7 @@ static int OpenAudio( decoder_t *p_dec )
 #ifndef SYS_DARWIN
     if( ( i_error = p_sys->InitializeQTML( 6 + 16 ) ) )
     {
-        msg_Dbg( p_dec, "error while InitializeQTML = %d", i_error );
+        msg_Dbg( p_dec, "error on InitializeQTML = %d", i_error );
         goto exit_error;
     }
 #endif
@@ -404,7 +407,7 @@ static int OpenAudio( decoder_t *p_dec )
                                          &p_sys->myConverter );
     if( i_error )
     {
-        msg_Err( p_dec, "error while SoundConverterOpen = %d", i_error );
+        msg_Err( p_dec, "error on SoundConverterOpen = %d", i_error );
         goto exit_error;
     }
 
@@ -420,7 +423,7 @@ static int OpenAudio( decoder_t *p_dec )
                                                 FCC( 'w', 'a', 'v', 'e' ),
                                                 ((uint8_t*)p_dec->fmt_in.p_extra) + 36 + 8 );
 
-        msg_Dbg( p_dec, "error while SoundConverterSetInfo = %d", i_error );
+        msg_Dbg( p_dec, "error on SoundConverterSetInfo = %d", i_error );
     }
 
     WantedBufferSize = p_sys->OutputFormatInfo.numChannels *
@@ -448,7 +451,7 @@ static int OpenAudio( decoder_t *p_dec )
     if( (i_error = p_sys->SoundConverterBeginConversion(p_sys->myConverter)) )
     {
         msg_Err( p_dec,
-                 "error while SoundConverterBeginConversion = %d", i_error );
+                 "error on SoundConverterBeginConversion = %d", i_error );
         goto exit_error;
     }
 
@@ -484,6 +487,8 @@ exit_error:
     vlc_mutex_unlock( &p_dec->p_vlc->quicktime_lock );
 #endif
     vlc_mutex_unlock( lockval.p_address );
+
+    free( p_sys );
     return VLC_EGENERIC;
 }
 
@@ -630,6 +635,7 @@ static int OpenVideo( decoder_t *p_dec )
 {
     decoder_sys_t *p_sys = malloc( sizeof( decoder_sys_t ) );
 
+#ifndef WIN32
     vlc_value_t                         lockval;
     long                                i_result;
     ComponentDescription                desc;
@@ -675,7 +681,7 @@ static int OpenVideo( decoder_t *p_dec )
 #ifndef SYS_DARWIN
     if( ( i_result = p_sys->InitializeQTML( 6 + 16 ) ) )
     {
-        msg_Dbg( p_dec, "error while InitializeQTML = %d", (int)i_result );
+        msg_Dbg( p_dec, "error on InitializeQTML = %d", (int)i_result );
         goto exit_error;
     }
 #endif
@@ -803,9 +809,13 @@ exit_error:
     Restore_LDT_Keeper( p_sys->ldt_fs );
 #endif
     vlc_mutex_unlock( lockval.p_address );
+
+#endif /* !WIN32 */
+
     return VLC_EGENERIC;
 }
 
+#ifndef WIN32
 /*****************************************************************************
  * DecodeVideo:
  *****************************************************************************/
@@ -814,7 +824,7 @@ static picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block )
     decoder_sys_t *p_sys = p_dec->p_sys;
     block_t       *p_block;
     picture_t     *p_pic;
-    mtitme        i_pts;
+    mtime_t       i_pts;
 
     ComponentResult cres;
 
@@ -888,6 +898,7 @@ static picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block )
 
     return p_pic;
 }
+#endif /* !WIN32 */
 
 /*****************************************************************************
  * QTAudioInit:
@@ -929,7 +940,7 @@ static int QTAudioInit( decoder_t *p_dec )
 
     if( p_sys->InitializeQTML == NULL )
     {
-        msg_Err( p_dec, "failed geting proc address InitializeQTML" );
+        msg_Err( p_dec, "failed getting proc address InitializeQTML" );
         return VLC_EGENERIC;
     }
     if( p_sys->SoundConverterOpen == NULL ||
@@ -940,7 +951,7 @@ static int QTAudioInit( decoder_t *p_dec )
         p_sys->SoundConverterEndConversion == NULL ||
         p_sys->SoundConverterBeginConversion == NULL )
     {
-        msg_Err( p_dec, "failed geting proc address" );
+        msg_Err( p_dec, "failed getting proc address" );
         return VLC_EGENERIC;
     }
 
@@ -950,7 +961,7 @@ static int QTAudioInit( decoder_t *p_dec )
     return VLC_SUCCESS;
 }
 
-
+#ifndef WIN32
 /*****************************************************************************
  * QTVideoInit:
  *****************************************************************************/
@@ -995,7 +1006,7 @@ static int QTVideoInit( decoder_t *p_dec )
 
     if( p_sys->InitializeQTML == NULL )
     {
-        msg_Dbg( p_dec, "failed geting proc address InitializeQTML" );
+        msg_Dbg( p_dec, "failed getting proc address InitializeQTML" );
         return VLC_EGENERIC;
     }
     if( p_sys->FindNextComponent == NULL ||
@@ -1008,12 +1019,11 @@ static int QTVideoInit( decoder_t *p_dec )
         p_sys->QTNewGWorldFromPtr == NULL ||
         p_sys->NewHandleClear == NULL )
     {
-        msg_Err( p_dec, "failed geting proc address" );
+        msg_Err( p_dec, "failed getting proc address" );
         return VLC_EGENERIC;
     }
 #endif /* SYS_DARWIN */
 
     return VLC_SUCCESS;
 }
-
-
+#endif /* !WIN32 */