summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2014-09-01 17:41:50 +0300
committerSebastian Dröge <sebastian@centricular.com>2014-09-02 09:13:14 +0300
commit108257791a399a3c29ba4e9c2b076e04b72e2976 (patch)
tree580bb86068a68ea8c1051e22808ca02aaa0abe71 /sys
parent872b0157b70f2dc64e52b2da0d7fb39e54e7ad0c (diff)
downloadgstreamer-plugins-bad-108257791a399a3c29ba4e9c2b076e04b72e2976.tar.gz
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.
Diffstat (limited to 'sys')
-rw-r--r--sys/androidmedia/gstamcaudiodec.c12
-rw-r--r--sys/androidmedia/gstamcaudiodec.h3
2 files changed, 0 insertions, 15 deletions
diff --git a/sys/androidmedia/gstamcaudiodec.c b/sys/androidmedia/gstamcaudiodec.c
index 5174ea9d2..5ee745f68 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;
@@ -902,7 +891,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 50500a862..dc435fe87 100644
--- a/sys/androidmedia/gstamcaudiodec.h
+++ b/sys/androidmedia/gstamcaudiodec.h
@@ -83,9 +83,6 @@ struct _GstAmcAudioDec
gboolean eos;
GstFlowReturn downstream_flow_ret;
-
- /* Output buffers counter */
- gint n_buffers;
};
struct _GstAmcAudioDecClass