From 795d366a0cb97285ab6cceef04a3acf995c1f3da Mon Sep 17 00:00:00 2001 From: Andoni Morales Alastruey Date: Thu, 4 Oct 2012 14:05:13 +0200 Subject: [PATCH] audioencoder: don't fail if the start vfunc is not implemented Fix behaviour to match documentation and decoder class behaviour. https://bugzilla.gnome.org/show_bug.cgi?id=685490 --- gst-libs/gst/audio/gstaudioencoder.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gst-libs/gst/audio/gstaudioencoder.c b/gst-libs/gst/audio/gstaudioencoder.c index 99b5ca6e9f..73a5f3748d 100644 --- a/gst-libs/gst/audio/gstaudioencoder.c +++ b/gst-libs/gst/audio/gstaudioencoder.c @@ -1971,8 +1971,12 @@ 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 && klass->start) - result = klass->start (enc); + if (!enc->priv->active) { + if (klass->start) + result = klass->start (enc); + else + result = TRUE; + } } else { /* We must make sure streaming has finished before resetting things * and calling the ::stop vfunc */