mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 18:05:37 +00:00
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.
This commit is contained in:
parent
b6219112b3
commit
f8ed8dd613
1 changed files with 1 additions and 1 deletions
|
@ -275,7 +275,7 @@ gst_wavenc_sink_setcaps (GstPad * pad, GstCaps * caps)
|
||||||
|
|
||||||
wavenc = GST_WAVENC (gst_pad_get_parent (pad));
|
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");
|
GST_WARNING_OBJECT (wavenc, "cannot change format in middle of stream");
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue