From: Mark Nauwelaerts Date: Tue, 27 Sep 2011 14:18:05 +0000 (+0200) Subject: audioencoder: only got_data if we really got some X-Git-Tag: RELEASE-0.10.36~275 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=01d27ee084ffd8deb3a45a682fd6a226d292aa55;p=platform%2Fupstream%2Fgst-plugins-base.git audioencoder: only got_data if we really got some ... which avoids going loopy with casual subclass. --- diff --git a/gst-libs/gst/audio/gstaudioencoder.c b/gst-libs/gst/audio/gstaudioencoder.c index 7c4ab4a..1a8887e 100644 --- a/gst-libs/gst/audio/gstaudioencoder.c +++ b/gst-libs/gst/audio/gstaudioencoder.c @@ -494,7 +494,8 @@ gst_audio_encoder_finish_frame (GstAudioEncoder * enc, GstBuffer * buf, buf ? GST_BUFFER_SIZE (buf) : -1, samples); /* mark subclass still alive and providing */ - priv->got_data = TRUE; + if (G_LIKELY (buf)) + priv->got_data = TRUE; if (priv->pending_events) { GList *pending_events, *l;