obs-ffmpeg: Use get_buf function to ensure buffers_mutex is locked

This commit is contained in:
Richard Stanway
2022-08-01 13:34:27 -07:00
committed by Jim
parent 2e8b8c5ae1
commit ac025b51ac
+1 -6
View File
@@ -682,12 +682,7 @@ try {
if (!enc->linesize)
enc->linesize = frame->linesize[0];
if (enc->available_buffers.size()) {
buf = std::move(enc->available_buffers.back());
enc->available_buffers.pop_back();
} else {
buf = alloc_buf(enc);
}
buf = get_buf(enc);
copy_frame_data(enc, buf, frame);