Commit bde1bd99 authored by Alex Converse's avatar Alex Converse Committed by Gerrit Code Review
Browse files

Merge "Exit with error when vpxenc cannot correctly scale the input."

parents f4f5de00 2a3092f9
......@@ -1264,6 +1264,10 @@ static void encode_frame(struct stream_state *stream,
/* Scale if necessary */
if (img && (img->d_w != cfg->g_w || img->d_h != cfg->g_h)) {
if (img->fmt != VPX_IMG_FMT_I420 && img->fmt != VPX_IMG_FMT_YV12) {
fprintf(stderr, "%s can only scale 4:2:0 8bpp inputs\n", exec_name);
exit(EXIT_FAILURE);
}
if (!stream->img)
stream->img = vpx_img_alloc(NULL, VPX_IMG_FMT_I420,
cfg->g_w, cfg->g_h, 16);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment