From 042b4f9a294bf0ecaea85de13175b45d54602309 Mon Sep 17 00:00:00 2001 From: Vincent Penquerc'h Date: Tue, 22 Nov 2011 13:29:10 +0000 Subject: [PATCH] oggstream: extract opus comments if available --- ext/ogg/gstoggstream.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ext/ogg/gstoggstream.c b/ext/ogg/gstoggstream.c index 79b67b2..96cd581 100644 --- a/ext/ogg/gstoggstream.c +++ b/ext/ogg/gstoggstream.c @@ -1937,6 +1937,15 @@ packet_duration_opus (GstOggStream * pad, ogg_packet * packet) return duration; } +static void +extract_tags_opus (GstOggStream * pad, ogg_packet * packet) +{ + if (packet->bytes >= 8 && memcmp (packet->packet, "OpusTags", 8) == 0) { + tag_list_from_vorbiscomment_packet (packet, + (const guint8 *) "OpusTags", 8, &pad->taglist); + } +} + /* *INDENT-OFF* */ /* indent hates our freedoms */ @@ -2118,7 +2127,7 @@ const GstOggMap mappers[] = { is_header_opus, packet_duration_opus, NULL, - extract_tags_count + extract_tags_opus }, { "\001audio\0\0\0", 9, 53, -- 2.7.4