projects
/
platform
/
upstream
/
libvpx.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6c2e88e
)
Exit with error when vpxenc cannot correctly scale the input.
author
Alex Converse
<aconverse@google.com>
Sat, 17 May 2014 01:49:04 +0000
(18:49 -0700)
committer
Alex Converse
<aconverse@google.com>
Sat, 17 May 2014 01:49:04 +0000
(18:49 -0700)
Change-Id: I4713406b751da06c41962f444f8873accc4fa044
vpxenc.c
patch
|
blob
|
history
diff --git
a/vpxenc.c
b/vpxenc.c
index
28d43f2
..
4d96294
100644
(file)
--- a/
vpxenc.c
+++ b/
vpxenc.c
@@
-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);