未验证 提交 83493e35 编写于 作者: J Jim 提交者: GitHub

Merge pull request #1887 from jpark37/dead-yuv-code

libobs: Remove unreachable YUV decode paths
......@@ -1668,8 +1668,6 @@ bool update_async_texture(struct obs_source *source,
gs_texture_t *tex, gs_texrender_t *texrender)
{
enum convert_type type;
uint8_t *ptr;
uint32_t linesize;
source->async_flip = frame->flip;
......@@ -1683,29 +1681,7 @@ bool update_async_texture(struct obs_source *source,
return true;
}
if (!gs_texture_map(tex, &ptr, &linesize))
return false;
if (type == CONVERT_420)
decompress_420((const uint8_t* const*)frame->data,
frame->linesize,
0, frame->height, ptr, linesize);
else if (type == CONVERT_NV12)
decompress_nv12((const uint8_t* const*)frame->data,
frame->linesize,
0, frame->height, ptr, linesize);
else if (type == CONVERT_422_Y)
decompress_422(frame->data[0], frame->linesize[0],
0, frame->height, ptr, linesize, true);
else if (type == CONVERT_422_U)
decompress_422(frame->data[0], frame->linesize[0],
0, frame->height, ptr, linesize, false);
gs_texture_unmap(tex);
return true;
return false;
}
static inline void obs_source_draw_texture(struct obs_source *source,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册