summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Otte <otte@gnome.org>2003-11-12 02:58:06 +0000
committerBenjamin Otte <otte@gnome.org>2003-11-12 02:58:06 +0000
commit908cbecf5622a030fce129d1b2217b6b3ebe1288 (patch)
tree2832ab7bf3c57167fa0d1956e0d7feb29c10b8b2
parent8f4600fbffc7751d2fcdeb763dc81d20ddf49bd5 (diff)
downloadgstreamer-plugins-base-908cbecf5622a030fce129d1b2217b6b3ebe1288.tar.gz
use existing data in mp3 when available
Original commit message from CVS: use existing data in mp3 when available
-rw-r--r--gst/typefind/gsttypefindfunctions.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gst/typefind/gsttypefindfunctions.c b/gst/typefind/gsttypefindfunctions.c
index 1089c09d5..468b3b066 100644
--- a/gst/typefind/gsttypefindfunctions.c
+++ b/gst/typefind/gsttypefindfunctions.c
@@ -398,7 +398,11 @@ mp3_type_find (GstTypeFind *tf, gpointer unused)
guint prev_layer = 0, prev_bitrate = 0,
prev_channels = 0, prev_samplerate = 0;
- head_data = gst_type_find_peek (tf, offset, 4);
+ if (offset + 4 <= skipped + size) {
+ head_data = data + offset - skipped;
+ } else {
+ head_data = gst_type_find_peek (tf, offset, 4);
+ }
if (!head_data)
break;
head = GUINT32_FROM_BE(*((guint32 *) head_data));