Skip to content

Commit 21a8b65

Browse files
authored
doin something idk if its right
1 parent a718aec commit 21a8b65

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/recorder.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,17 @@ void Recorder::filterFrame(AVFrame* inputFrame, AVFrame* outputFrame) {
272272
return;
273273
}
274274

275-
av_buffersink_get_frame(m_buffersinkCtx, outputFrame);
275+
while(true) {
276+
ret = av_buffersink_get_frame(m_buffersinkCtx, outputFrame);
277+
278+
outputFrame->time_base = av_buffersink_get_time_base(m_buffersinkCtx);
279+
280+
if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF) {
281+
break;
282+
}
283+
284+
av_frame_unref(outputFrame);
285+
}
276286
}
277287

278288
void Recorder::stop() {

0 commit comments

Comments
 (0)