Skip to content

Commit c000749

Browse files
authored
add back unrefs
1 parent 17d29c9 commit c000749

File tree

2 files changed

+29
-26
lines changed

2 files changed

+29
-26
lines changed

.github/workflows/multi-platform.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@ jobs:
1515
- name: Windows
1616
os: windows-latest
1717

18-
- name: macOS
19-
os: macos-latest
18+
# - name: macOS
19+
# os: macos-latest
2020

21-
- name: Android32
22-
os: ubuntu-latest
23-
target: Android32
24-
min-sdk: 24
21+
# - name: Android32
22+
# os: ubuntu-latest
23+
# target: Android32
24+
# min-sdk: 24
2525

26-
- name: Android64
27-
os: ubuntu-latest
28-
target: Android64
26+
# - name: Android64
27+
# os: ubuntu-latest
28+
# target: Android64
2929

3030
name: ${{ matrix.config.name }}
3131
runs-on: ${{ matrix.config.os }}

src/recorder.cpp

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -129,23 +129,23 @@ bool Recorder::init(const RenderSettings& settings) {
129129
return false;
130130
}
131131

132-
m_convertedFrame = av_frame_alloc();
133-
m_convertedFrame->format = m_codecContext->pix_fmt;
134-
m_convertedFrame->width = m_codecContext->width;
135-
m_convertedFrame->height = m_codecContext->height;
136-
if(av_image_alloc(m_convertedFrame->data, m_convertedFrame->linesize, m_convertedFrame->width, m_convertedFrame->height, m_codecContext->pix_fmt, 32) < 0) {
137-
geode::log::error("Could not allocate raw picture buffer.");
138-
return false;
139-
}
140-
141-
m_filteredFrame = av_frame_alloc();
142-
m_filteredFrame->format = m_codecContext->pix_fmt;
143-
m_filteredFrame->width = m_codecContext->width;
144-
m_filteredFrame->height = m_codecContext->height;
145-
if(av_image_alloc(m_filteredFrame->data, m_filteredFrame->linesize, m_filteredFrame->width, m_filteredFrame->height, m_codecContext->pix_fmt, 32) < 0) {
146-
geode::log::error("Could not allocate raw picture buffer.");
147-
return false;
148-
}
132+
// m_convertedFrame = av_frame_alloc();
133+
// m_convertedFrame->format = m_codecContext->pix_fmt;
134+
// m_convertedFrame->width = m_codecContext->width;
135+
// m_convertedFrame->height = m_codecContext->height;
136+
// if(av_image_alloc(m_convertedFrame->data, m_convertedFrame->linesize, m_convertedFrame->width, m_convertedFrame->height, m_codecContext->pix_fmt, 32) < 0) {
137+
// geode::log::error("Could not allocate raw picture buffer.");
138+
// return false;
139+
// }
140+
141+
// m_filteredFrame = av_frame_alloc();
142+
// m_filteredFrame->format = m_codecContext->pix_fmt;
143+
// m_filteredFrame->width = m_codecContext->width;
144+
// m_filteredFrame->height = m_codecContext->height;
145+
// if(av_image_alloc(m_filteredFrame->data, m_filteredFrame->linesize, m_filteredFrame->width, m_filteredFrame->height, m_codecContext->pix_fmt, 32) < 0) {
146+
// geode::log::error("Could not allocate raw picture buffer.");
147+
// return false;
148+
// }
149149

150150
m_packet = new AVPacket();
151151

@@ -255,6 +255,9 @@ bool Recorder::writeFrame(const std::vector<uint8_t>& frameData) {
255255
av_packet_unref(m_packet);
256256
}
257257

258+
av_frame_unref(m_convertedFrame);
259+
av_frame_unref(m_filteredFrame);
260+
258261
return true;
259262
}
260263

0 commit comments

Comments
 (0)