From f1dc779db13f55e0d9e816257598184878f735d6 Mon Sep 17 00:00:00 2001 From: Anonymous Ignore This Date: Thu, 24 Jul 2003 03:02:06 +0000 Subject: [PATCH] Don't attempt to negotiate format if our srcpad isn't linked. Simply succeed and continue. This is needed for pure ... Original commit message from CVS: Don't attempt to negotiate format if our srcpad isn't linked. Simply succeed and continue. This is needed for pure indexer applications. --- ext/mpeg2dec/gstmpeg2dec.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ext/mpeg2dec/gstmpeg2dec.c b/ext/mpeg2dec/gstmpeg2dec.c index 522578b7af..522c6ace08 100644 --- a/ext/mpeg2dec/gstmpeg2dec.c +++ b/ext/mpeg2dec/gstmpeg2dec.c @@ -315,6 +315,11 @@ gst_mpeg2dec_negotiate_format (GstMpeg2dec *mpeg2dec) GstCaps *allowed; GstCaps *intersect, *trylist, *head, *to_intersect; + if (!GST_PAD_IS_LINKED (mpeg2dec->srcpad)) { + mpeg2dec->format = MPEG2DEC_FORMAT_I420; + return TRUE; + } + /* we what we are allowed to do */ allowed = gst_pad_get_allowed_caps (mpeg2dec->srcpad); /* we could not get allowed caps */ -- 2.34.1