Browse Source

compile linux

David Rose 18 years ago
parent
commit
352c417095
1 changed files with 11 additions and 1 deletions
  1. 11 1
      panda/src/movies/ffmpegVideo.cxx

+ 11 - 1
panda/src/movies/ffmpegVideo.cxx

@@ -23,6 +23,16 @@
 #include "avcodec.h"
 #include "avcodec.h"
 #include "avformat.h"
 #include "avformat.h"
 
 
+// Earlier versions of ffmpeg didn't define this symbol.
+#ifndef PIX_FMT_BGRA
+#ifdef WORDS_BIGENDIAN
+#define PIX_FMT_BGRA PIX_FMT_BGR32_1
+#else
+#define PIX_FMT_BGRA PIX_FMT_RGBA32
+#endif
+#endif  // PIX_FMT_BGRA
+
+
 TypeHandle FfmpegVideo::_type_handle;
 TypeHandle FfmpegVideo::_type_handle;
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -35,8 +45,8 @@ FfmpegVideo(const Filename &name) :
   MovieVideo(name),
   MovieVideo(name),
   _filename(name),
   _filename(name),
   _format_ctx(0),
   _format_ctx(0),
-  _video_index(-1),
   _video_ctx(0),
   _video_ctx(0),
+  _video_index(-1),
   _frame(0),
   _frame(0),
   _frame_out(0),
   _frame_out(0),
   _min_fseek(3.0)
   _min_fseek(3.0)