mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 16:26:39 +00:00
appsrc: Don't chain up BaseSrc::negotiate()
If we have caps then we can only set exactly those caps, if we have no caps yet then negotiating anything is not very meaningful because the caps are defined by the application and not downstream. Avoids, among other things, an unnecessary allocation query and spurious useless caps being set before the first buffer. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3757>
This commit is contained in:
parent
2e574a80d9
commit
20d394cb21
1 changed files with 1 additions and 3 deletions
|
@ -1329,7 +1329,7 @@ gst_app_src_do_negotiate (GstBaseSrc * basesrc)
|
|||
{
|
||||
GstAppSrc *appsrc = GST_APP_SRC_CAST (basesrc);
|
||||
GstAppSrcPrivate *priv = appsrc->priv;
|
||||
gboolean result;
|
||||
gboolean result = TRUE;
|
||||
GstCaps *caps;
|
||||
|
||||
GST_OBJECT_LOCK (basesrc);
|
||||
|
@ -1342,8 +1342,6 @@ gst_app_src_do_negotiate (GstBaseSrc * basesrc)
|
|||
if (caps) {
|
||||
result = gst_base_src_set_caps (basesrc, caps);
|
||||
gst_caps_unref (caps);
|
||||
} else {
|
||||
result = GST_BASE_SRC_CLASS (parent_class)->negotiate (basesrc);
|
||||
}
|
||||
g_mutex_lock (&priv->mutex);
|
||||
|
||||
|
|
Loading…
Reference in a new issue