diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2014-09-01 17:41:50 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2014-09-01 17:44:04 +0300 |
commit | f5e73d28080b1afbe5bc2c60b9a135ece45d6907 (patch) | |
tree | f95b31079196d9cd4a7caf686e8a185eda06b874 | |
parent | 114ee3355ad6db075c230f26ed92da84953a6def (diff) |
amcaudiodec: Remove hack for Google MP3 decoder
The first buffer does not contain more garbage than any other MP3 decoder
outputs and we don't really know how much we have to drop or not.
After this change the output has the same duration as with mad.
-rw-r--r-- | sys/androidmedia/gstamcaudiodec.c | 12 | ||||
-rw-r--r-- | sys/androidmedia/gstamcaudiodec.h | 3 |
2 files changed, 0 insertions, 15 deletions
diff --git a/sys/androidmedia/gstamcaudiodec.c b/sys/androidmedia/gstamcaudiodec.c index eabe27d4b..a94e5698a 100644 --- a/sys/androidmedia/gstamcaudiodec.c +++ b/sys/androidmedia/gstamcaudiodec.c @@ -490,7 +490,6 @@ retry: buffer_info.flags); is_eos = ! !(buffer_info.flags & BUFFER_FLAG_END_OF_STREAM); - self->n_buffers++; if (buffer_info.size > 0) { GstAmcAudioDecClass *klass = GST_AMC_AUDIO_DEC_GET_CLASS (self); @@ -506,16 +505,6 @@ retry: if (idx >= self->n_output_buffers) goto invalid_buffer_index; - if (strcmp (klass->codec_info->name, "OMX.google.mp3.decoder") == 0) { - /* Google's MP3 decoder outputs garbage in the first output buffer - * so we just drop it here */ - if (self->n_buffers == 1) { - GST_DEBUG_OBJECT (self, - "Skipping first buffer of Google MP3 decoder output"); - goto done; - } - } - if (buffer_info.size % self->info.bpf != 0) goto invalid_buffer_size; @@ -934,7 +923,6 @@ gst_amc_audio_dec_set_format (GstAudioDecoder * decoder, GstCaps * caps) GST_STR_NULL (format_string)); g_free (format_string); - self->n_buffers = 0; if (!gst_amc_codec_configure (self->codec, format, 0, &err)) { GST_ERROR_OBJECT (self, "Failed to configure codec"); GST_ELEMENT_ERROR_FROM_ERROR (self, err); diff --git a/sys/androidmedia/gstamcaudiodec.h b/sys/androidmedia/gstamcaudiodec.h index 6a09017b7..6c6124ed0 100644 --- a/sys/androidmedia/gstamcaudiodec.h +++ b/sys/androidmedia/gstamcaudiodec.h @@ -82,9 +82,6 @@ struct _GstAmcAudioDec gboolean drained; GstFlowReturn downstream_flow_ret; - - /* Output buffers counter */ - gint n_buffers; }; struct _GstAmcAudioDecClass |