浏览代码

Revert "libobs: Fix memory leak (Enforce cache limit)"

This reverts commit 4459ed3e2c13eca5de9b88020da08d94ed8a2a11.
jp9000 10 年之前
父节点
当前提交
f03e66fc99
共有 1 个文件被更改,包括 0 次插入8 次删除
  1. 0 8
      libobs/obs-source.c

+ 0 - 8
libobs/obs-source.c

@@ -1629,8 +1629,6 @@ static inline void free_async_cache(struct obs_source *source)
 	da_resize(source->async_frames, 0);
 	da_resize(source->async_frames, 0);
 }
 }
 
 
-#define CACHE_LIMIT 30
-
 static inline struct obs_source_frame *cache_video(struct obs_source *source,
 static inline struct obs_source_frame *cache_video(struct obs_source *source,
 		const struct obs_source_frame *frame)
 		const struct obs_source_frame *frame)
 {
 {
@@ -1659,12 +1657,6 @@ static inline struct obs_source_frame *cache_video(struct obs_source *source,
 	}
 	}
 
 
 	if (!new_frame) {
 	if (!new_frame) {
-		/* ignore frames if cache limit reached */
-		if (source->async_cache.num == CACHE_LIMIT) {
-			pthread_mutex_unlock(&source->async_mutex);
-			return NULL;
-		}
-
 		struct async_frame new_af;
 		struct async_frame new_af;
 
 
 		new_frame = obs_source_frame_create(frame->format,
 		new_frame = obs_source_frame_create(frame->format,