From 01d27ee084ffd8deb3a45a682fd6a226d292aa55 Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Tue, 27 Sep 2011 16:18:05 +0200 Subject: [PATCH] audioencoder: only got_data if we really got some ... which avoids going loopy with casual subclass. --- gst-libs/gst/audio/gstaudioencoder.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gst-libs/gst/audio/gstaudioencoder.c b/gst-libs/gst/audio/gstaudioencoder.c index 7c4ab4aeb..1a8887ea9 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; -- 2.34.1