From f8ed8dd6137482bc830e6599b397bdbe854c1e62 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 29 Apr 2011 08:55:19 +0200 Subject: [PATCH] wavenc: Allow setcaps to be called after a format was negotiated if it's compatible Otherwise wavenc will fail if upstream decides to set equivalent caps or caps with additional information later. Thanks to Alexander Schremmer for finding this bug. --- gst/wavenc/gstwavenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst/wavenc/gstwavenc.c b/gst/wavenc/gstwavenc.c index c3b0c5738..7db0e188f 100644 --- a/gst/wavenc/gstwavenc.c +++ b/gst/wavenc/gstwavenc.c @@ -275,7 +275,7 @@ gst_wavenc_sink_setcaps (GstPad * pad, GstCaps * caps) wavenc = GST_WAVENC (gst_pad_get_parent (pad)); - if (wavenc->sent_header) { + if (wavenc->sent_header && !gst_caps_can_intersect (caps, GST_PAD_CAPS (pad))) { GST_WARNING_OBJECT (wavenc, "cannot change format in middle of stream"); goto fail; } -- 2.34.1