From 0816d4f9cd2441d69814fc28ba5d45d4ee5aae08 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 23 Jun 2010 14:38:49 +0000 Subject: [PATCH] From Magnus Kessler, "FFmpeg headers need __STDC_CONSTANT_MACROS defined before stdint.h is loaded. The file FFmpegHeaders.hpp sets this definition. However, if stdint.h is already included through other files, it won't take any effect. Include FFmpeg headers as early as possible in order to avoid stdint.h being included on other paths. " --- src/osgPlugins/ffmpeg/FFmpegAudioStream.hpp | 2 +- src/osgPlugins/ffmpeg/FFmpegImageStream.hpp | 6 +++--- src/osgPlugins/ffmpeg/ReaderWriterFFmpeg.cpp | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/osgPlugins/ffmpeg/FFmpegAudioStream.hpp b/src/osgPlugins/ffmpeg/FFmpegAudioStream.hpp index 5143989fd..b48194646 100644 --- a/src/osgPlugins/ffmpeg/FFmpegAudioStream.hpp +++ b/src/osgPlugins/ffmpeg/FFmpegAudioStream.hpp @@ -2,8 +2,8 @@ #ifndef HEADER_GUARD_OSGFFMPEG_FFMPEG_AUDIO_STREAM_H #define HEADER_GUARD_OSGFFMPEG_FFMPEG_AUDIO_STREAM_H -#include #include "FFmpegDecoder.hpp" +#include namespace osgFFmpeg { diff --git a/src/osgPlugins/ffmpeg/FFmpegImageStream.hpp b/src/osgPlugins/ffmpeg/FFmpegImageStream.hpp index cd4b200e4..033a892db 100644 --- a/src/osgPlugins/ffmpeg/FFmpegImageStream.hpp +++ b/src/osgPlugins/ffmpeg/FFmpegImageStream.hpp @@ -2,14 +2,14 @@ #ifndef HEADER_GUARD_OSGFFMPEG_FFMPEG_IMAGE_STREAM_H #define HEADER_GUARD_OSGFFMPEG_FFMPEG_IMAGE_STREAM_H +#include "FFmpegDecoder.hpp" +#include "MessageQueue.hpp" + #include #include #include -#include "FFmpegDecoder.hpp" -#include "MessageQueue.hpp" - namespace osgFFmpeg { diff --git a/src/osgPlugins/ffmpeg/ReaderWriterFFmpeg.cpp b/src/osgPlugins/ffmpeg/ReaderWriterFFmpeg.cpp index ca4af165f..fb1a0ddc8 100644 --- a/src/osgPlugins/ffmpeg/ReaderWriterFFmpeg.cpp +++ b/src/osgPlugins/ffmpeg/ReaderWriterFFmpeg.cpp @@ -11,13 +11,13 @@ * OpenSceneGraph Public License for more details. */ +#include "FFmpegHeaders.hpp" +#include "FFmpegImageStream.hpp" + #include #include #include -#include "FFmpegHeaders.hpp" -#include "FFmpegImageStream.hpp" - /** Implementation heavily inspired by http://www.dranger.com/ffmpeg/ */