mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
audioencoder: Call reset() before the start() vfunc to guarantee a clean state
The same was done already in the decoder, and we cleaned some state just above manually that would also be taken care of by reset(). This makes sure that the element is in the same state before start() is called the very first time and every future call after the element was used already.
This commit is contained in:
parent
098b42f36b
commit
aae6400962
1 changed files with 2 additions and 5 deletions
|
@ -1941,11 +1941,8 @@ gst_audio_encoder_activate (GstAudioEncoder * enc, gboolean active)
|
|||
GST_DEBUG_OBJECT (enc, "activate %d", active);
|
||||
|
||||
if (active) {
|
||||
|
||||
if (enc->priv->tags)
|
||||
gst_tag_list_unref (enc->priv->tags);
|
||||
enc->priv->tags = gst_tag_list_new_empty ();
|
||||
enc->priv->tags_changed = FALSE;
|
||||
/* arrange clean state */
|
||||
gst_audio_encoder_reset (enc, TRUE);
|
||||
|
||||
if (!enc->priv->active && klass->start)
|
||||
result = klass->start (enc);
|
||||
|
|
Loading…
Reference in a new issue