vp8dec: Error out gracefully if we get an unsupported color format
In theory we can only get I420 though, just to be on the safe side.
This commit is contained in:
parent
9b7a6a3f90
commit
943520382f
@ -527,6 +527,14 @@ gst_vp8_dec_handle_frame (GstVideoDecoder * decoder, GstVideoCodecFrame * frame)
|
|||||||
|
|
||||||
img = vpx_codec_get_frame (&dec->decoder, &iter);
|
img = vpx_codec_get_frame (&dec->decoder, &iter);
|
||||||
if (img) {
|
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) {
|
if (deadline < 0) {
|
||||||
GST_LOG_OBJECT (dec, "Skipping late frame (%f s past deadline)",
|
GST_LOG_OBJECT (dec, "Skipping late frame (%f s past deadline)",
|
||||||
(double) -deadline / GST_SECOND);
|
(double) -deadline / GST_SECOND);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user