diff options
Diffstat (limited to '')
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. |