From ceee36195ae6835631ca93fbdfc5f2553dae4aca Mon Sep 17 00:00:00 2001 From: Vincent Penquerc'h Date: Tue, 22 Nov 2011 12:00:58 +0000 Subject: [PATCH] oggstream: early out on headers when determining packet duration --- ext/ogg/gstoggstream.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ext/ogg/gstoggstream.c b/ext/ogg/gstoggstream.c index e56e561181..ac4ae34d0d 100644 --- a/ext/ogg/gstoggstream.c +++ b/ext/ogg/gstoggstream.c @@ -1895,6 +1895,10 @@ packet_duration_opus (GstOggStream * pad, ogg_packet * packet) if (packet->bytes < 1) return 0; + /* headers */ + if (packet->bytes >= 8 && !memcmp (packet->packet, "Opus", 4)) + return 0; + toc = packet->packet[0]; frame_duration = durations[toc >> 3] * 1000; -- 2.34.1