amrnbdec: Use gst_audio_decoder_set_needs_format() instead of custom code

This commit is contained in:
Sebastian Dröge 2013-12-05 12:09:04 +01:00
parent cf32f8f6a5
commit b378c171ff

View file

@ -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 */