Fix for raw yuv input
Sets fmt correctly for raw yuv inputs, and reads frame correctly. Change-Id: I05405b2265545d5c6d1cf7b086db9548cbe5d8ba
This commit is contained in:
@@ -83,6 +83,7 @@ int read_yuv_frame(struct VpxInputContext *input_ctx, vpx_image_t *yuv_frame) {
|
||||
struct FileTypeDetectionBuffer *detect = &input_ctx->detect;
|
||||
int plane = 0;
|
||||
int shortread = 0;
|
||||
const int bytespp = (input_ctx->fmt & VPX_IMG_FMT_HIGH) ? 2 : 1;
|
||||
|
||||
for (plane = 0; plane < 3; ++plane) {
|
||||
uint8_t *ptr;
|
||||
@@ -108,7 +109,7 @@ int read_yuv_frame(struct VpxInputContext *input_ctx, vpx_image_t *yuv_frame) {
|
||||
}
|
||||
|
||||
for (r = 0; r < h; ++r) {
|
||||
size_t needed = w;
|
||||
size_t needed = w * bytespp;
|
||||
size_t buf_position = 0;
|
||||
const size_t left = detect->buf_read - detect->position;
|
||||
if (left > 0) {
|
||||
|
Reference in New Issue
Block a user