mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
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.
This commit is contained in:
parent
291b05b40a
commit
c24995c31c
1 changed files with 0 additions and 20 deletions
|
@ -485,23 +485,6 @@ gst_video_encoder_set_headers (GstVideoEncoder * video_encoder, GList * headers)
|
|||
GST_VIDEO_ENCODER_STREAM_UNLOCK (video_encoder);
|
||||
}
|
||||
|
||||
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) {
|
||||
|
|
Loading…
Reference in a new issue