]> git.sesse.net Git - vlc/commitdiff
avcodec: fix compilation.
authorRémi Duraffort <ivoire@videolan.org>
Fri, 28 Aug 2009 10:39:55 +0000 (12:39 +0200)
committerRémi Duraffort <ivoire@videolan.org>
Fri, 28 Aug 2009 10:39:55 +0000 (12:39 +0200)
modules/codec/avcodec/avcodec.c

index ca6c75f61fa5109bd59c04b97d139da05aa3ebe8..6b38a7852aa26c87245b783394abfb9f94978d24 100644 (file)
 #   include <avcodec.h>
 #endif
 
+#include "avcodec.h"
+#include "avutil.h"
+
 #if LIBAVCODEC_VERSION_INT < AV_VERSION_INT( 51, 48, 0 )
 #   error You must update libavcodec to a version >= 51.48.0
 #elif LIBAVCODEC_VERSION_INT < AV_VERSION_INT( 52, 25, 0 )
 #   warning You should update libavcodec to get subtitle support
 #endif
 
-
-#include "avcodec.h"
-#include "avutil.h"
-
 /*****************************************************************************
  * decoder_sys_t: decoder descriptor
  *****************************************************************************/
@@ -315,9 +314,11 @@ static void CloseDecoder( vlc_object_t *p_this )
     case VIDEO_ES:
          EndVideoDec ( p_dec );
         break;
+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 52, 25, 0 )
     case SPU_ES:
          EndSubtitleDec( p_dec );
         break;
+#endif
     }
 
     if( p_sys->p_context )