Skip to content
Snippets Groups Projects
Commit d00968b0 authored by Edward Hervey's avatar Edward Hervey :metal: Committed by Sebastian Dröge
Browse files

theoradec: Check for valid width/height

If width or height are zero ... there's no video :)
parent 76e35a90
No related branches found
No related tags found
No related merge requests found
......@@ -465,6 +465,9 @@ theora_handle_type_packet (GstTheoraDec * dec)
GST_DEBUG_OBJECT (dec, "after fixup frame dimension %dx%d, offset %d:%d",
info->width, info->height, dec->info.pic_x, dec->info.pic_y);
if (info->width == 0 || info->height == 0)
goto invalid_dimensions;
/* done */
dec->decoder = th_decode_alloc (&dec->info, dec->setup);
......@@ -528,6 +531,13 @@ unsupported_format:
GST_ERROR_OBJECT (dec, "Invalid pixel format %d", dec->info.pixel_fmt);
return GST_FLOW_ERROR;
}
invalid_dimensions:
{
GST_ERROR_OBJECT (dec, "Invalid dimensions (width:%d, height:%d)",
info->width, info->height);
return GST_FLOW_ERROR;
}
}
static GstFlowReturn
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment