Commit c24995c3 authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

videoencoder: There's no point in resetting the encoder when the caps change

The subclass will be called with set_format() and there it can drain
if necessary and reset whatever is necessary. This is the same behaviour
as for the video decoder.
parent 291b05b4
......@@ -485,23 +485,6 @@ gst_video_encoder_set_headers (GstVideoEncoder * video_encoder, GList * headers)
static gboolean
gst_video_encoder_drain (GstVideoEncoder * enc)
GstVideoEncoderPrivate *priv;
priv = enc->priv;
GST_DEBUG_OBJECT (enc, "draining");
if (priv->drained) {
GST_DEBUG_OBJECT (enc, "already drained");
return TRUE;
return gst_video_encoder_reset (enc, FALSE);
static GstVideoCodecState *
_new_output_state (GstCaps * caps, GstVideoCodecState * reference)
......@@ -592,9 +575,6 @@ gst_video_encoder_setcaps (GstVideoEncoder * encoder, GstCaps * caps)
goto caps_not_changed;
/* arrange draining pending frames */
gst_video_encoder_drain (encoder);
/* and subclass should be ready to configure format at any time around */
ret = encoder_class->set_format (encoder, state);
if (ret) {
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment