From 1d2407f6679b5ddf8d1a15870eddd32b1cd71b64 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 17 May 2021 11:19:55 +0200 Subject: [PATCH 1/2] ffmpeg: Fix compile error with latest ffmpeg version Fixes #1164 --- panda/src/ffmpeg/ffmpegAudioCursor.cxx | 2 +- panda/src/ffmpeg/ffmpegVideoCursor.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/panda/src/ffmpeg/ffmpegAudioCursor.cxx b/panda/src/ffmpeg/ffmpegAudioCursor.cxx index 62a20b12ed..aab7d14f6e 100644 --- a/panda/src/ffmpeg/ffmpegAudioCursor.cxx +++ b/panda/src/ffmpeg/ffmpegAudioCursor.cxx @@ -101,7 +101,7 @@ FfmpegAudioCursor(FfmpegAudio *src) : _audio_rate = codecpar->sample_rate; _audio_channels = codecpar->channels; - AVCodec *pAudioCodec = avcodec_find_decoder(codecpar->codec_id); + const AVCodec *pAudioCodec = avcodec_find_decoder(codecpar->codec_id); if (pAudioCodec == nullptr) { cleanup(); return; diff --git a/panda/src/ffmpeg/ffmpegVideoCursor.cxx b/panda/src/ffmpeg/ffmpegVideoCursor.cxx index b6bf441857..2f63757e61 100644 --- a/panda/src/ffmpeg/ffmpegVideoCursor.cxx +++ b/panda/src/ffmpeg/ffmpegVideoCursor.cxx @@ -534,7 +534,7 @@ open_stream() { _video_timebase = av_q2d(stream->time_base); _min_fseek = (int)(3.0 / _video_timebase); - AVCodec *pVideoCodec = nullptr; + const AVCodec *pVideoCodec = nullptr; if (ffmpeg_prefer_libvpx) { #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55, 0, 0) if (codecpar->codec_id == AV_CODEC_ID_VP9) { From 70ac82d5daea72c3a2f49b5c9db0cf777ceda9c0 Mon Sep 17 00:00:00 2001 From: "Paul m. p. P" Date: Mon, 31 May 2021 17:43:25 +0200 Subject: [PATCH 2/2] bullet: Fix compilation issue with BulletHeightfieldShape Fixes #1161 --- panda/src/bullet/bulletHeightfieldShape.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/panda/src/bullet/bulletHeightfieldShape.cxx b/panda/src/bullet/bulletHeightfieldShape.cxx index 55ed86d16e..739abd580b 100644 --- a/panda/src/bullet/bulletHeightfieldShape.cxx +++ b/panda/src/bullet/bulletHeightfieldShape.cxx @@ -44,7 +44,7 @@ BulletHeightfieldShape(const PNMImage &image, PN_stdfloat max_height, BulletUpAx _shape = new btHeightfieldTerrainShape(_num_rows, _num_cols, - _data, + (const void *)_data, max_height, up, true, false); @@ -102,7 +102,7 @@ BulletHeightfieldShape(Texture *tex, PN_stdfloat max_height, BulletUpAxis up) : _shape = new btHeightfieldTerrainShape(_num_rows, _num_cols, - _data, + (const void *)_data, max_height, up, true, false); @@ -127,7 +127,7 @@ BulletHeightfieldShape(const BulletHeightfieldShape ©) { _shape = new btHeightfieldTerrainShape(_num_rows, _num_cols, - _data, + (const void *)_data, _max_height, _up, true, false); @@ -208,7 +208,7 @@ fillin(DatagramIterator &scan, BamReader *manager) { _shape = new btHeightfieldTerrainShape(_num_rows, _num_cols, - _data, + (const void *)_data, _max_height, _up, true, false);