summaryrefslogtreecommitdiffstats
path: root/ext/flac/gstflactag.c
diff options
context:
space:
mode:
authorChristophe Fergeau <teuf@gnome.org>2004-06-01 20:23:12 +0000
committerChristophe Fergeau <teuf@gnome.org>2004-06-01 20:23:12 +0000
commita6b8686ecbe6c09a3cb283c71fb386d9ab9acabd (patch)
tree9c8e23e729484b7449dcd55f4e473fa74c270dad /ext/flac/gstflactag.c
parent39aeaa3632dde648be65f760fbeeb2b4bf30b747 (diff)
ext/flac/gstflactag.c: strip ending framing bit from vorbiscomment buffer since libflac doesn't expect it (reports a ...
Original commit message from CVS: 2004-06-01 Christophe Fergeau <teuf@gnome.org> * ext/flac/gstflactag.c: strip ending framing bit from vorbiscomment buffer since libflac doesn't expect it (reports a sync error when it encounters that)
Diffstat (limited to 'ext/flac/gstflactag.c')
-rw-r--r--ext/flac/gstflactag.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/ext/flac/gstflactag.c b/ext/flac/gstflactag.c
index 229cacf9..cbf2964b 100644
--- a/ext/flac/gstflactag.c
+++ b/ext/flac/gstflactag.c
@@ -518,6 +518,18 @@ gst_flac_tag_chain (GstPad * pad, GstData * data)
("Vorbis comment of size %d too long", size));
return;
}
+
+ /* Get rid of the framing bit at the end of the vorbiscomment buffer
+ * if it exists since libFLAC seems to lose sync because of this
+ * bit in gstflacdec
+ */
+ if (GST_BUFFER_DATA (buffer)[GST_BUFFER_SIZE (buffer) - 1] == 1) {
+ GstBuffer *sub;
+
+ sub = gst_buffer_create_sub (buffer, 0, GST_BUFFER_SIZE (buffer) - 1);
+ gst_buffer_unref (buffer);
+ buffer = sub;
+ }
}
/* The 4 byte metadata block header isn't accounted for in the total