This prevent implementing allocation query, as the format need to be
known in order to determin the size and number of buffers needed.
Note: This may lead to few regressions that will need fixing
https://bugzilla.gnome.org/show_bug.cgi?id=732288
/* FIXME : (and introduce a context ?) */
gboolean drained;
gboolean at_eos;
- gboolean do_caps;
gint64 min_latency;
gint64 max_latency;
GstCaps *caps;
gst_event_parse_caps (event, &caps);
- ret = TRUE;
- encoder->priv->do_caps = TRUE;
+ ret = gst_video_encoder_setcaps (encoder, caps);
+
gst_event_unref (event);
event = NULL;
break;
g_return_val_if_fail (klass->handle_frame != NULL, GST_FLOW_ERROR);
- if (G_UNLIKELY (encoder->priv->do_caps)) {
- GstCaps *caps = gst_pad_get_current_caps (encoder->sinkpad);
- if (!caps)
- goto not_negotiated;
- if (!gst_video_encoder_setcaps (encoder, caps)) {
- gst_caps_unref (caps);
- goto not_negotiated;
- }
- gst_caps_unref (caps);
- encoder->priv->do_caps = FALSE;
- }
-
if (!encoder->priv->input_state)
goto not_negotiated;