mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 04:56:14 +00:00
amrnbdec: Use gst_audio_decoder_set_needs_format() instead of custom code
This commit is contained in:
parent
cf32f8f6a5
commit
b378c171ff
1 changed files with 1 additions and 3 deletions
|
@ -143,6 +143,7 @@ gst_amrnbdec_class_init (GstAmrnbDecClass * klass)
|
||||||
static void
|
static void
|
||||||
gst_amrnbdec_init (GstAmrnbDec * amrnbdec)
|
gst_amrnbdec_init (GstAmrnbDec * amrnbdec)
|
||||||
{
|
{
|
||||||
|
gst_audio_decoder_set_needs_format (GST_AUDIO_DECODER (amrnbdec), TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
@ -289,9 +290,6 @@ gst_amrnbdec_handle_frame (GstAudioDecoder * dec, GstBuffer * buffer)
|
||||||
if (!buffer || !gst_buffer_get_size (buffer))
|
if (!buffer || !gst_buffer_get_size (buffer))
|
||||||
return GST_FLOW_OK;
|
return GST_FLOW_OK;
|
||||||
|
|
||||||
if (amrnbdec->rate == 0 || amrnbdec->channels == 0)
|
|
||||||
goto not_negotiated;
|
|
||||||
|
|
||||||
gst_buffer_map (buffer, &inmap, GST_MAP_READ);
|
gst_buffer_map (buffer, &inmap, GST_MAP_READ);
|
||||||
|
|
||||||
/* get output */
|
/* get output */
|
||||||
|
|
Loading…
Reference in a new issue