aboutsummaryrefslogtreecommitdiffstats
path: root/mediaplugin/src/plugins
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-11-09 14:51:11 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-11-09 14:51:11 +0000
commit4f8c5829e3536d156e6d257b70f312268bb72e41 (patch)
treeb38bd1b817050c0b47a27618b72a4bb204bd59a0 /mediaplugin/src/plugins
parent42f4abb95bee3221367221bd39bf4692dace5d85 (diff)
downloadusdx-4f8c5829e3536d156e6d257b70f312268bb72e41.tar.gz
usdx-4f8c5829e3536d156e6d257b70f312268bb72e41.tar.xz
usdx-4f8c5829e3536d156e6d257b70f312268bb72e41.zip
compatibility with older ffmpeg versions
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@2719 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'mediaplugin/src/plugins')
-rw-r--r--mediaplugin/src/plugins/media/ffmpeg/ffmpeg_audio_convert.h9
-rw-r--r--mediaplugin/src/plugins/media/ffmpeg/ffmpeg_core.cpp5
-rw-r--r--mediaplugin/src/plugins/media/ffmpeg/ffmpeg_video_decode.cpp1
3 files changed, 11 insertions, 4 deletions
diff --git a/mediaplugin/src/plugins/media/ffmpeg/ffmpeg_audio_convert.h b/mediaplugin/src/plugins/media/ffmpeg/ffmpeg_audio_convert.h
index f2b44e48..ee4c5a81 100644
--- a/mediaplugin/src/plugins/media/ffmpeg/ffmpeg_audio_convert.h
+++ b/mediaplugin/src/plugins/media/ffmpeg/ffmpeg_audio_convert.h
@@ -27,6 +27,7 @@
#include "ffmpeg_core.h"
#include "core/plugin_audio_convert.h"
+#include <math.h>
extern const audioConverterInfo_t audioConverterInfo;
@@ -68,10 +69,10 @@ protected:
TAPS, 10, 0, 0.8);
#else
_resampleContext = audio_resample_init(
- dstFormatInfo.getChannels(),
- srcFormatInfo.getChannels(),
- lround(dstFormatInfo.getSampleRate()),
- lround(srcFormatInfo.getSampleRate()));
+ _dstFormatInfo.getChannels(),
+ _srcFormatInfo.getChannels(),
+ lround(_dstFormatInfo.getSampleRate()),
+ lround(_srcFormatInfo.getSampleRate()));
#endif
if (!_resampleContext) {
diff --git a/mediaplugin/src/plugins/media/ffmpeg/ffmpeg_core.cpp b/mediaplugin/src/plugins/media/ffmpeg/ffmpeg_core.cpp
index 7e55802b..6456322b 100644
--- a/mediaplugin/src/plugins/media/ffmpeg/ffmpeg_core.cpp
+++ b/mediaplugin/src/plugins/media/ffmpeg/ffmpeg_core.cpp
@@ -24,6 +24,7 @@
*/
#include "ffmpeg_core.h"
#include "core/logger.h"
+#include <errno.h>
#include <sstream>
const uint8_t* STATUS_PACKET = (uint8_t*)"STATUS_PACKET";
@@ -175,9 +176,11 @@ bool MediaCore_FFmpeg::convertFFmpegToAudioFormat(SampleFormat ffmpegFormat, aud
case SAMPLE_FMT_FLT:
*format = asfFloat;
break;
+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(51,65,0)
case SAMPLE_FMT_DBL:
*format = asfDouble;
break;
+#endif
default:
return false;
}
@@ -206,6 +209,8 @@ static int CDECL ffmpegStreamOpen(URLContext *h, const char *filename, int flags
break;
case URL_RDONLY:
mode = FILE_OPEN_MODE_READ;
+ default:
+ return AVERROR(ENOSYS);
}
fileStream_t *stream = pluginCore->fileOpen(utf8Filename.c_str(), mode);
diff --git a/mediaplugin/src/plugins/media/ffmpeg/ffmpeg_video_decode.cpp b/mediaplugin/src/plugins/media/ffmpeg/ffmpeg_video_decode.cpp
index c582c771..b3fc77b3 100644
--- a/mediaplugin/src/plugins/media/ffmpeg/ffmpeg_video_decode.cpp
+++ b/mediaplugin/src/plugins/media/ffmpeg/ffmpeg_video_decode.cpp
@@ -29,6 +29,7 @@
#include "ffmpeg_video_decode.h"
#include <sstream>
+#include <math.h>
// These are called whenever we allocate a frame buffer.
// We use this to store the global_pts in a frame at the time it is allocated.