projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9b7a6a3
)
vp8dec: Error out gracefully if we get an unsupported color format
author
Sebastian Dröge
<slomo@circular-chaos.org>
Sat, 22 Jun 2013 08:59:17 +0000
(10:59 +0200)
committer
Sebastian Dröge
<slomo@circular-chaos.org>
Sat, 22 Jun 2013 08:59:17 +0000
(10:59 +0200)
In theory we can only get I420 though, just to be on the safe side.
ext/vpx/gstvp8dec.c
patch
|
blob
|
history
diff --git
a/ext/vpx/gstvp8dec.c
b/ext/vpx/gstvp8dec.c
index
6e96efa
..
6ba2ce8
100644
(file)
--- a/
ext/vpx/gstvp8dec.c
+++ b/
ext/vpx/gstvp8dec.c
@@
-527,6
+527,14
@@
gst_vp8_dec_handle_frame (GstVideoDecoder * decoder, GstVideoCodecFrame * frame)
img = vpx_codec_get_frame (&dec->decoder, &iter);
if (img) {
+ if (img->fmt != VPX_IMG_FMT_I420) {
+ vpx_img_free (img);
+ GST_ELEMENT_ERROR (decoder, LIBRARY, ENCODE,
+ ("Failed to decode frame"), ("Unsupported color format %d",
+ img->fmt));
+ return GST_FLOW_ERROR;
+ }
+
if (deadline < 0) {
GST_LOG_OBJECT (dec, "Skipping late frame (%f s past deadline)",
(double) -deadline / GST_SECOND);