Browse Source

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

Richard Stanway 3 years ago
parent
commit
ac025b51ac
1 changed files with 1 additions and 6 deletions
  1. 1 6
      plugins/obs-ffmpeg/texture-amf.cpp

+ 1 - 6
plugins/obs-ffmpeg/texture-amf.cpp

@@ -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);