summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2013-12-05 12:09:04 +0100
committerSebastian Dröge <sebastian@centricular.com>2013-12-05 12:09:04 +0100
commitb378c171ff7536f476f2386dd5f2004d1d5f3cb2 (patch)
treead3ff3ad601466683364808e4ca6e108c37bf85e
parentcf32f8f6a58beb1333203b7e3f82d43e1a0cca81 (diff)
amrnbdec: Use gst_audio_decoder_set_needs_format() instead of custom code
-rw-r--r--ext/amrnb/amrnbdec.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/ext/amrnb/amrnbdec.c b/ext/amrnb/amrnbdec.c
index f82b8ccc..81741db4 100644
--- a/ext/amrnb/amrnbdec.c
+++ b/ext/amrnb/amrnbdec.c
@@ -143,6 +143,7 @@ gst_amrnbdec_class_init (GstAmrnbDecClass * klass)
static void
gst_amrnbdec_init (GstAmrnbDec * amrnbdec)
{
+ gst_audio_decoder_set_needs_format (GST_AUDIO_DECODER (amrnbdec), TRUE);
}
static gboolean
@@ -289,9 +290,6 @@ gst_amrnbdec_handle_frame (GstAudioDecoder * dec, GstBuffer * buffer)
if (!buffer || !gst_buffer_get_size (buffer))
return GST_FLOW_OK;
- if (amrnbdec->rate == 0 || amrnbdec->channels == 0)
- goto not_negotiated;
-
gst_buffer_map (buffer, &inmap, GST_MAP_READ);
/* get output */