mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 04:31:06 +00:00
v4l2: videodec: Fix broken template caps
The profiles and levels were applied to the common caps instead of the copy. That had the side effect of setting profiles/level from one CODEC onto another. Leaving to encoder not being registered or not-negotiated errors. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/599>
This commit is contained in:
parent
d93664d65d
commit
3ea71a63f6
1 changed files with 4 additions and 4 deletions
|
@ -1176,20 +1176,20 @@ gst_v4l2_video_enc_register (GstPlugin * plugin, GType type,
|
|||
GstV4l2VideoEncCData *cdata;
|
||||
GValue value = G_VALUE_INIT;
|
||||
|
||||
filtered_caps = gst_caps_intersect (src_caps, codec_caps);
|
||||
|
||||
if (codec != NULL && video_fd != -1) {
|
||||
if (gst_v4l2_codec_probe_levels (codec, video_fd, &value)) {
|
||||
gst_caps_set_value (src_caps, "level", &value);
|
||||
gst_caps_set_value (filtered_caps, "level", &value);
|
||||
g_value_unset (&value);
|
||||
}
|
||||
|
||||
if (gst_v4l2_codec_probe_profiles (codec, video_fd, &value)) {
|
||||
gst_caps_set_value (src_caps, "profile", &value);
|
||||
gst_caps_set_value (filtered_caps, "profile", &value);
|
||||
g_value_unset (&value);
|
||||
}
|
||||
}
|
||||
|
||||
filtered_caps = gst_caps_intersect (src_caps, codec_caps);
|
||||
|
||||
cdata = g_new0 (GstV4l2VideoEncCData, 1);
|
||||
cdata->device = g_strdup (device_path);
|
||||
cdata->sink_caps = gst_caps_ref (sink_caps);
|
||||
|
|
Loading…
Reference in a new issue