Opus streams outside of Ogg may not have headers, and oggstream
may be used by oggmux to mux an Opus stream which does not come
from Ogg - thus without headers.
Determining headerness by packet count would strip the first two
packets from such an Opus stream, leading to a very small amount
of audio being clipped at the beginning of the stream.
return TRUE;
}
+static gboolean
+is_header_opus (GstOggStream * pad, ogg_packet * packet)
+{
+ return packet->bytes >= 8 && !memcmp (packet->packet, "Opus", 4);
+}
+
static gint64
packet_duration_opus (GstOggStream * pad, ogg_packet * packet)
{
return 0;
/* headers */
- if (packet->bytes >= 8 && !memcmp (packet->packet, "Opus", 4))
+ if (is_header_opus (pad, packet))
return 0;
toc = packet->packet[0];
granulepos_to_granule_default,
granule_to_granulepos_default,
NULL,
- is_header_count,
+ is_header_opus,
packet_duration_opus,
NULL,
extract_tags_count