mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 12:49:40 +00:00
amrwbdec: Use gst_audio_decoder_set_needs_format() instead of custom code
This commit is contained in:
parent
6049866ca6
commit
cf32f8f6a5
1 changed files with 1 additions and 3 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue