Browse Source

libobs: Fix crash starting raw encoder before gpu encoder

Fixes a crash when starting a raw encoder before a GPU encoder.
jp9000 6 years ago
parent
commit
d416f781fd
1 changed files with 2 additions and 0 deletions
  1. 2 0
      libobs/obs-video.c

+ 2 - 0
libobs/obs-video.c

@@ -466,6 +466,8 @@ static void output_gpu_encoders(struct obs_core_video *video, bool raw_active,
 
 
 	if (!video->textures_converted[prev_texture])
 	if (!video->textures_converted[prev_texture])
 		goto end;
 		goto end;
+	if (!video->vframe_info_buffer_gpu.size)
+		goto end;
 
 
 	struct obs_vframe_info vframe_info;
 	struct obs_vframe_info vframe_info;
 	circlebuf_pop_front(&video->vframe_info_buffer_gpu, &vframe_info,
 	circlebuf_pop_front(&video->vframe_info_buffer_gpu, &vframe_info,