shithub: libvpx

Download patch

ref: bde1bd997e6dfb99ac0dcf2bd69a6700532d1bdc
parent: f4f5de002744a42fcc95997691e139c4c7cc5afe
parent: 2a3092f9953c959548ae992e12f5407bbfaef4fa
author: Alex Converse <aconverse@google.com>
date: Mon May 19 09:20:12 EDT 2014

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

--- a/vpxenc.c
+++ b/vpxenc.c
@@ -1264,6 +1264,10 @@
 
   /* 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);