summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2013-12-05 12:08:46 +0100
committerSebastian Dröge <sebastian@centricular.com>2013-12-05 12:08:46 +0100
commitcf32f8f6a58beb1333203b7e3f82d43e1a0cca81 (patch)
treee08f6e6c8c36a6106864cfc8699be56a930f4646
parent6049866ca688212c400fd592c74de70072806df2 (diff)
amrwbdec: Use gst_audio_decoder_set_needs_format() instead of custom code
-rw-r--r--ext/amrwbdec/amrwbdec.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/ext/amrwbdec/amrwbdec.c b/ext/amrwbdec/amrwbdec.c
index 4bbed560..3a8f88be 100644
--- a/ext/amrwbdec/amrwbdec.c
+++ b/ext/amrwbdec/amrwbdec.c
@@ -106,6 +106,7 @@ gst_amrwbdec_class_init (GstAmrwbDecClass * klass)
static void
gst_amrwbdec_init (GstAmrwbDec * amrwbdec)
{
+ gst_audio_decoder_set_needs_format (GST_AUDIO_DECODER (amrwbdec), TRUE);
}
static gboolean
@@ -212,9 +213,6 @@ gst_amrwbdec_handle_frame (GstAudioDecoder * dec, GstBuffer * buffer)
if (!buffer || !gst_buffer_get_size (buffer))
return GST_FLOW_OK;
- if (amrwbdec->rate == 0 || amrwbdec->channels == 0)
- goto not_negotiated;
-
/* the library seems to write into the source data, hence the copy. */
/* should be no problem */
gst_buffer_map (buffer, &inmap, GST_MAP_READ);