GNOME Bugzilla – Bug 692294
[xvidenc] Sink pad getcaps prevents caps renegotiation
Last modified: 2014-01-25 14:08:47 UTC
After negotiating the sink pad of xvidenc to a specific caps, it refuses to renegotiate to any other caps, e.g. with a different frame rate. This is caused by the following part of the getcaps function in gstxvidenc.c, starting on line 990 for me: /* If we already have caps return them */ if (GST_PAD_CAPS (pad)) return gst_caps_ref (GST_PAD_CAPS (pad)); According to http://cgit.freedesktop.org/gstreamer/gstreamer/tree/docs/random/negotiation?h=0.10 , "get_caps() functions should always ignore the currently negotiated caps of a link", which is not what is happening here. With these lines commented out, the element successfully renegotiates to a different frame rate, and produces a playable stream.
xvid is not ported to 1.0 yet, and as part of that it would need to be ported to the videoencoder base class... which will automagically fix this bug. Also it's valid to not allow changing the caps once they're set... for the case when the encoder can't reconfigure itself.