mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
vaapivideomemory: don't crash when trying to allocate 0x0 images.
In some occasions, a buffer pool is created for pre-initialization purposes regardless of whether a valid image size is available or not. However, during actual decode stage, the vaapidecode element is expected to update the srcpad caps with the new dimensions, thus also triggering a reset of the underlying bufferpool.
This commit is contained in:
parent
6e395c60ac
commit
09dcb1e0f7
1 changed files with 2 additions and 0 deletions
|
@ -60,6 +60,8 @@ get_image_data (GstVaapiImage * image)
|
|||
static GstVaapiImage *
|
||||
new_image (GstVaapiDisplay * display, const GstVideoInfo * vip)
|
||||
{
|
||||
if (!GST_VIDEO_INFO_WIDTH (vip) || !GST_VIDEO_INFO_HEIGHT (vip))
|
||||
return NULL;
|
||||
return gst_vaapi_image_new (display, GST_VIDEO_INFO_FORMAT (vip),
|
||||
GST_VIDEO_INFO_WIDTH (vip), GST_VIDEO_INFO_HEIGHT (vip));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue