Revert some const changes

Fixes #20307
This commit is contained in:
Henrik Rydgård
2025-05-01 22:55:50 +02:00
parent 0bbe1e1654
commit 2fde87b074
2 changed files with 4 additions and 5 deletions
+3 -4
View File
@@ -343,8 +343,7 @@ bool MediaEngine::openContext(bool keepReadPos) {
return true;
}
void MediaEngine::closeContext()
{
void MediaEngine::closeContext() {
#ifdef USE_FFMPEG
if (m_buffer)
av_free(m_buffer);
@@ -356,7 +355,7 @@ void MediaEngine::closeContext()
av_free(m_pIOContext->buffer);
if (m_pIOContext)
av_free(m_pIOContext);
for (const auto &it : m_pCodecCtxs) {
for (auto &it : m_pCodecCtxs) {
#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(57, 33, 100)
avcodec_free_context(&it.second);
#else
@@ -365,7 +364,7 @@ void MediaEngine::closeContext()
}
m_pCodecCtxs.clear();
// These are streams allocated from avformat_new_stream.
for (const auto &it : m_codecsToClose) {
for (auto &it : m_codecsToClose) {
avcodec_close(it);
}
m_codecsToClose.clear();
+1 -1
View File
@@ -113,7 +113,7 @@ public: // TODO: Very little of this below should be public.
int m_desWidth = 0;
int m_desHeight = 0;
int m_bufSize;
int m_bufSize; // initialized in constructor
s64 m_videopts = 0;
s64 m_firstTimeStamp = 0;