From fc5a1e468b3206556999b943356ae0751494a9a5 Mon Sep 17 00:00:00 2001 From: Hou Qi Date: Mon, 1 Mar 2021 14:32:40 +0800 Subject: [PATCH] v4l2videodec: Do not expose profiles/levels in vp8/vp9 template caps Vp8/vp9 supported profiles/levels are listed in decoder sink caps, but there is no parser for these two formats and the demuxers also don't have these information. It causes negotiation fail between demuxers and decoder when check caps "accept = gst_caps_is_subset (caps, template_caps);". To fix this, need to remove profiles/levels for vp8/vp9 formats in decoder sink caps. Fix #854 Part-of: --- sys/v4l2/gstv4l2videodec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/v4l2/gstv4l2videodec.c b/sys/v4l2/gstv4l2videodec.c index c61fb25224..65a9d40477 100644 --- a/sys/v4l2/gstv4l2videodec.c +++ b/sys/v4l2/gstv4l2videodec.c @@ -1231,7 +1231,8 @@ gst_v4l2_video_dec_register (GstPlugin * plugin, const gchar * basename, continue; } - if (cdata->codec != NULL) { + if (cdata->codec != NULL && cdata->codec != gst_v4l2_vp8_get_codec () + && cdata->codec != gst_v4l2_vp9_get_codec ()) { GValue value = G_VALUE_INIT; if (gst_v4l2_codec_probe_levels (cdata->codec, video_fd, &value)) {