diff options
-rw-r--r-- | intern/ffmpeg/tests/ffmpeg_codecs.cc | 13 | ||||
-rw-r--r-- | source/blender/editors/mesh/mesh_data.c | 9 |
2 files changed, 16 insertions, 6 deletions
diff --git a/intern/ffmpeg/tests/ffmpeg_codecs.cc b/intern/ffmpeg/tests/ffmpeg_codecs.cc index bb6e13579e5..d0c40736884 100644 --- a/intern/ffmpeg/tests/ffmpeg_codecs.cc +++ b/intern/ffmpeg/tests/ffmpeg_codecs.cc @@ -4,12 +4,13 @@ extern "C" { #include <libavcodec/avcodec.h> +#include <libavutil/channel_layout.h> #include <libavutil/log.h> } namespace { -bool test_vcodec(AVCodec *codec, AVPixelFormat pixelformat) +bool test_vcodec(const AVCodec *codec, AVPixelFormat pixelformat) { av_log_set_level(AV_LOG_QUIET); bool result = false; @@ -30,7 +31,7 @@ bool test_vcodec(AVCodec *codec, AVPixelFormat pixelformat) } return result; } -bool test_acodec(AVCodec *codec, AVSampleFormat fmt) +bool test_acodec(const AVCodec *codec, AVSampleFormat fmt) { av_log_set_level(AV_LOG_QUIET); bool result = false; @@ -54,7 +55,7 @@ bool test_acodec(AVCodec *codec, AVSampleFormat fmt) bool test_codec_video_by_codecid(AVCodecID codec_id, AVPixelFormat pixelformat) { bool result = false; - AVCodec *codec = avcodec_find_encoder(codec_id); + const AVCodec *codec = avcodec_find_encoder(codec_id); if (codec) result = test_vcodec(codec, pixelformat); return result; @@ -63,7 +64,7 @@ bool test_codec_video_by_codecid(AVCodecID codec_id, AVPixelFormat pixelformat) bool test_codec_video_by_name(const char *codecname, AVPixelFormat pixelformat) { bool result = false; - AVCodec *codec = avcodec_find_encoder_by_name(codecname); + const AVCodec *codec = avcodec_find_encoder_by_name(codecname); if (codec) result = test_vcodec(codec, pixelformat); return result; @@ -72,7 +73,7 @@ bool test_codec_video_by_name(const char *codecname, AVPixelFormat pixelformat) bool test_codec_audio_by_codecid(AVCodecID codec_id, AVSampleFormat fmt) { bool result = false; - AVCodec *codec = avcodec_find_encoder(codec_id); + const AVCodec *codec = avcodec_find_encoder(codec_id); if (codec) result = test_acodec(codec, fmt); return result; @@ -81,7 +82,7 @@ bool test_codec_audio_by_codecid(AVCodecID codec_id, AVSampleFormat fmt) bool test_codec_audio_by_name(const char *codecname, AVSampleFormat fmt) { bool result = false; - AVCodec *codec = avcodec_find_encoder_by_name(codecname); + const AVCodec *codec = avcodec_find_encoder_by_name(codecname); if (codec) result = test_acodec(codec, fmt); return result; diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c index 49a5345d048..b3f90880388 100644 --- a/source/blender/editors/mesh/mesh_data.c +++ b/source/blender/editors/mesh/mesh_data.c @@ -21,6 +21,7 @@ #include "BKE_customdata.h" #include "BKE_editmesh.h" #include "BKE_mesh.h" +#include "BKE_mesh_runtime.h" #include "BKE_report.h" #include "DEG_depsgraph.h" @@ -1110,6 +1111,8 @@ static void mesh_add_verts(Mesh *mesh, int len) mesh->vdata = vdata; BKE_mesh_update_customdata_pointers(mesh, false); + BKE_mesh_runtime_clear_cache(mesh); + /* scan the input list and insert the new vertices */ /* set default flags */ @@ -1146,6 +1149,8 @@ static void mesh_add_edges(Mesh *mesh, int len) mesh->edata = edata; BKE_mesh_update_customdata_pointers(mesh, false); /* new edges don't change tessellation */ + BKE_mesh_runtime_clear_cache(mesh); + /* set default flags */ medge = &mesh->medge[mesh->totedge]; for (i = 0; i < len; i++, medge++) { @@ -1174,6 +1179,8 @@ static void mesh_add_loops(Mesh *mesh, int len) CustomData_add_layer(&ldata, CD_MLOOP, CD_CALLOC, NULL, totloop); } + BKE_mesh_runtime_clear_cache(mesh); + CustomData_free(&mesh->ldata, mesh->totloop); mesh->ldata = ldata; BKE_mesh_update_customdata_pointers(mesh, true); @@ -1205,6 +1212,8 @@ static void mesh_add_polys(Mesh *mesh, int len) mesh->pdata = pdata; BKE_mesh_update_customdata_pointers(mesh, true); + BKE_mesh_runtime_clear_cache(mesh); + /* set default flags */ mpoly = &mesh->mpoly[mesh->totpoly]; for (i = 0; i < len; i++, mpoly++) { |