mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 10:11:08 +00:00
d3d11download: Fix decide_allocation
Caps should be parsed in any cases. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1691>
This commit is contained in:
parent
3c713cc16e
commit
27246ebeb0
1 changed files with 5 additions and 7 deletions
|
@ -269,26 +269,24 @@ gst_d3d11_download_decide_allocation (GstBaseTransform * trans,
|
||||||
gboolean has_videometa;
|
gboolean has_videometa;
|
||||||
GstCaps *outcaps = NULL;
|
GstCaps *outcaps = NULL;
|
||||||
|
|
||||||
|
gst_query_parse_allocation (query, &outcaps, NULL);
|
||||||
|
|
||||||
|
if (!outcaps)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
if (gst_query_get_n_allocation_pools (query) > 0) {
|
if (gst_query_get_n_allocation_pools (query) > 0) {
|
||||||
gst_query_parse_nth_allocation_pool (query, 0, &pool, &size, &min, &max);
|
gst_query_parse_nth_allocation_pool (query, 0, &pool, &size, &min, &max);
|
||||||
|
|
||||||
if (!pool)
|
|
||||||
gst_query_parse_allocation (query, &outcaps, NULL);
|
|
||||||
|
|
||||||
update_pool = TRUE;
|
update_pool = TRUE;
|
||||||
} else {
|
} else {
|
||||||
GstVideoInfo vinfo;
|
GstVideoInfo vinfo;
|
||||||
|
|
||||||
gst_query_parse_allocation (query, &outcaps, NULL);
|
|
||||||
gst_video_info_from_caps (&vinfo, outcaps);
|
gst_video_info_from_caps (&vinfo, outcaps);
|
||||||
size = vinfo.size;
|
size = vinfo.size;
|
||||||
min = max = 0;
|
min = max = 0;
|
||||||
update_pool = FALSE;
|
update_pool = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!outcaps)
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
has_videometa = gst_query_find_allocation_meta (query,
|
has_videometa = gst_query_find_allocation_meta (query,
|
||||||
GST_VIDEO_META_API_TYPE, nullptr);
|
GST_VIDEO_META_API_TYPE, nullptr);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue