mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-22 23:28:16 +00:00
v4l2videodec: Default to template in caps query
This commit is contained in:
parent
27a617d75f
commit
fb852669de
1 changed files with 5 additions and 2 deletions
|
@ -562,12 +562,14 @@ gst_v4l2_video_dec_src_query (GstVideoDecoder * decoder, GstQuery * query)
|
|||
switch (GST_QUERY_TYPE (query)) {
|
||||
case GST_QUERY_CAPS:{
|
||||
GstCaps *filter, *result = NULL;
|
||||
GstPad *pad = GST_VIDEO_DECODER_SRC_PAD (decoder);
|
||||
|
||||
gst_query_parse_caps (query, &filter);
|
||||
|
||||
if (self->probed_srccaps)
|
||||
result = gst_caps_ref (self->probed_srccaps);
|
||||
else
|
||||
result = gst_v4l2_object_get_raw_caps ();
|
||||
result = gst_pad_get_pad_template_caps (pad);
|
||||
|
||||
if (filter) {
|
||||
GstCaps *tmp = result;
|
||||
|
@ -600,12 +602,13 @@ gst_v4l2_video_dec_sink_query (GstVideoDecoder * decoder, GstQuery * query)
|
|||
switch (GST_QUERY_TYPE (query)) {
|
||||
case GST_QUERY_CAPS:{
|
||||
GstCaps *filter, *result = NULL;
|
||||
GstPad *pad = GST_VIDEO_DECODER_SINK_PAD (decoder);
|
||||
gst_query_parse_caps (query, &filter);
|
||||
|
||||
if (self->probed_sinkcaps)
|
||||
result = gst_caps_ref (self->probed_sinkcaps);
|
||||
else
|
||||
result = gst_v4l2_object_get_codec_caps ();
|
||||
result = gst_pad_get_pad_template_caps (pad);
|
||||
|
||||
if (filter) {
|
||||
GstCaps *tmp = result;
|
||||
|
|
Loading…
Reference in a new issue