diff --git a/panda/src/ffmpeg/ffmpegAudioCursor.cxx b/panda/src/ffmpeg/ffmpegAudioCursor.cxx index 5cddb016c8..a33db26b6f 100644 --- a/panda/src/ffmpeg/ffmpegAudioCursor.cxx +++ b/panda/src/ffmpeg/ffmpegAudioCursor.cxx @@ -148,7 +148,11 @@ FfmpegAudioCursor(FfmpegAudio *src) : _can_seek = true; _can_seek_fast = true; +#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(54, 59, 100) + _frame = av_frame_alloc(); +#else _frame = avcodec_alloc_frame(); +#endif _packet = new AVPacket; _buffer_size = AVCODEC_MAX_AUDIO_FRAME_SIZE / 2; @@ -194,7 +198,9 @@ FfmpegAudioCursor:: void FfmpegAudioCursor:: cleanup() { if (_frame) { -#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(54, 59, 100) +#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55, 45, 101) + av_frame_free(&_frame); +#elif LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(54, 59, 100) avcodec_free_frame(&_frame); #else av_free(&_frame); @@ -313,8 +319,7 @@ reload_buffer() { #ifdef HAVE_SWRESAMPLE if (_resample_ctx) { // Resample the data to signed 16-bit sample format. - uint8_t* out[SWR_CH_MAX] = {(uint8_t*) _buffer, NULL}; - bufsize = swr_convert(_resample_ctx, out, _buffer_size / 2, (const uint8_t**)_frame->extended_data, _frame->nb_samples); + bufsize = swr_convert(_resample_ctx, (uint8_t **)&_buffer, _buffer_size / 2, (const uint8_t**)_frame->extended_data, _frame->nb_samples); bufsize *= _audio_channels * 2; } else #endif diff --git a/panda/src/ffmpeg/ffmpegVideoCursor.cxx b/panda/src/ffmpeg/ffmpegVideoCursor.cxx index a02dac184b..87b3b48395 100644 --- a/panda/src/ffmpeg/ffmpegVideoCursor.cxx +++ b/panda/src/ffmpeg/ffmpegVideoCursor.cxx @@ -94,8 +94,13 @@ init_from(FfmpegVideo *source) { PIX_FMT_BGR24, SWS_BILINEAR | SWS_PRINT_INFO, NULL, NULL, NULL); #endif // HAVE_SWSCALE +#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(54, 59, 100) + _frame = av_frame_alloc(); + _frame_out = av_frame_alloc(); +#else _frame = avcodec_alloc_frame(); _frame_out = avcodec_alloc_frame(); +#endif if ((_frame == 0)||(_frame_out == 0)) { cleanup(); diff --git a/panda/src/gobj/samplerContext.h b/panda/src/gobj/samplerContext.h index 61a876d405..a51157ccc0 100644 --- a/panda/src/gobj/samplerContext.h +++ b/panda/src/gobj/samplerContext.h @@ -18,6 +18,7 @@ #include "pandabase.h" #include "adaptiveLru.h" +#include "simpleLru.h" #include "samplerState.h" #include "savedContext.h" diff --git a/panda/src/gobj/samplerState.h b/panda/src/gobj/samplerState.h index d5c10d6a1c..de3e4d6cf5 100644 --- a/panda/src/gobj/samplerState.h +++ b/panda/src/gobj/samplerState.h @@ -21,6 +21,7 @@ #include "namable.h" #include "luse.h" #include "numeric_types.h" +#include "bamReader.h" #include "config_gobj.h" class FactoryParams; diff --git a/panda/src/pgraph/cullBinManager.h b/panda/src/pgraph/cullBinManager.h index 4e6adf0821..6d29d9e1f4 100644 --- a/panda/src/pgraph/cullBinManager.h +++ b/panda/src/pgraph/cullBinManager.h @@ -20,6 +20,7 @@ #include "cullBinEnums.h" #include "pointerTo.h" #include "pvector.h" +#include "epvector.h" #include "pmap.h" #include "vector_int.h" #include "pStatCollector.h" diff --git a/panda/src/pgraph/shaderPool.cxx b/panda/src/pgraph/shaderPool.cxx index 1ca9ddbe00..5476960c6e 100644 --- a/panda/src/pgraph/shaderPool.cxx +++ b/panda/src/pgraph/shaderPool.cxx @@ -18,6 +18,7 @@ #include "virtualFileSystem.h" #include "loader.h" #include "shader.h" +#include "string_utils.h" ShaderPool *ShaderPool::_global_ptr = (ShaderPool *)NULL;