mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 00:31:13 +00:00
videoencoder: Keep sticky events around when doing a soft reset
The current code will first discard all frames, and then tries to copy all sticky events from the (now discarded) frames. Let's change the order. https://bugzilla.gnome.org/show_bug.cgi?id=746865
This commit is contained in:
parent
8b0329c45d
commit
992101f82a
1 changed files with 4 additions and 4 deletions
|
@ -340,10 +340,6 @@ gst_video_encoder_reset (GstVideoEncoder * encoder, gboolean hard)
|
||||||
|
|
||||||
priv->drained = TRUE;
|
priv->drained = TRUE;
|
||||||
|
|
||||||
g_list_foreach (priv->frames, (GFunc) gst_video_codec_frame_unref, NULL);
|
|
||||||
g_list_free (priv->frames);
|
|
||||||
priv->frames = NULL;
|
|
||||||
|
|
||||||
priv->bytes = 0;
|
priv->bytes = 0;
|
||||||
priv->time = 0;
|
priv->time = 0;
|
||||||
|
|
||||||
|
@ -389,6 +385,10 @@ gst_video_encoder_reset (GstVideoEncoder * encoder, gboolean hard)
|
||||||
encoder->priv->current_frame_events);
|
encoder->priv->current_frame_events);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_list_foreach (priv->frames, (GFunc) gst_video_codec_frame_unref, NULL);
|
||||||
|
g_list_free (priv->frames);
|
||||||
|
priv->frames = NULL;
|
||||||
|
|
||||||
GST_VIDEO_ENCODER_STREAM_UNLOCK (encoder);
|
GST_VIDEO_ENCODER_STREAM_UNLOCK (encoder);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in a new issue