From 1ed825d6e272eeddd3785fadc0dbae5710dcd247 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sun, 9 Nov 2014 10:25:25 +0100 Subject: avfvideosrc: Don't pretend to support reconfiguration We will run into an assertion in set_caps() if we try to change caps while the source is already running. Don't try to find new caps in GstBaseSrc::negotiate() to prevent caps changes. --- sys/applemedia/avfvideosrc.m | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sys/applemedia/avfvideosrc.m b/sys/applemedia/avfvideosrc.m index 4ee8a26cb..b943c97e7 100644 --- a/sys/applemedia/avfvideosrc.m +++ b/sys/applemedia/avfvideosrc.m @@ -933,6 +933,7 @@ static gboolean gst_avf_video_src_unlock (GstBaseSrc * basesrc); static gboolean gst_avf_video_src_unlock_stop (GstBaseSrc * basesrc); static GstFlowReturn gst_avf_video_src_create (GstPushSrc * pushsrc, GstBuffer ** buf); +static gboolean gst_avf_video_src_negotiate (GstBaseSrc * basesrc); static void @@ -957,6 +958,7 @@ gst_avf_video_src_class_init (GstAVFVideoSrcClass * klass) gstbasesrc_class->unlock = gst_avf_video_src_unlock; gstbasesrc_class->unlock_stop = gst_avf_video_src_unlock_stop; gstbasesrc_class->decide_allocation = gst_avf_video_src_decide_allocation; + gstbasesrc_class->negotiate = gst_avf_video_src_negotiate; gstpushsrc_class->create = gst_avf_video_src_create; @@ -1210,3 +1212,14 @@ gst_avf_video_src_create (GstPushSrc * pushsrc, GstBuffer ** buf) return ret; } + +static gboolean +gst_avf_video_src_negotiate (GstBaseSrc * basesrc) +{ + /* FIXME: We don't support reconfiguration yet */ + if (gst_pad_has_current_caps (GST_BASE_SRC_PAD (basesrc))) + return TRUE; + + return GST_BASE_SRC_CLASS (parent_class)->negotiate (basesrc); +} + -- cgit v1.2.1