mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
audioencoder: make stop() vfunc also optional
Just change default value, since we also don't want to fail if we want to deactivate and aren't active or want to activate and are already active. https://bugzilla.gnome.org/show_bug.cgi?id=685490
This commit is contained in:
parent
795d366a0c
commit
cdb22274e6
1 changed files with 3 additions and 7 deletions
|
@ -1956,7 +1956,7 @@ static gboolean
|
|||
gst_audio_encoder_activate (GstAudioEncoder * enc, gboolean active)
|
||||
{
|
||||
GstAudioEncoderClass *klass;
|
||||
gboolean result = FALSE;
|
||||
gboolean result = TRUE;
|
||||
|
||||
klass = GST_AUDIO_ENCODER_GET_CLASS (enc);
|
||||
|
||||
|
@ -1971,12 +1971,8 @@ gst_audio_encoder_activate (GstAudioEncoder * enc, gboolean active)
|
|||
enc->priv->tags = gst_tag_list_new_empty ();
|
||||
enc->priv->tags_changed = FALSE;
|
||||
|
||||
if (!enc->priv->active) {
|
||||
if (klass->start)
|
||||
result = klass->start (enc);
|
||||
else
|
||||
result = TRUE;
|
||||
}
|
||||
if (!enc->priv->active && klass->start)
|
||||
result = klass->start (enc);
|
||||
} else {
|
||||
/* We must make sure streaming has finished before resetting things
|
||||
* and calling the ::stop vfunc */
|
||||
|
|
Loading…
Reference in a new issue