oggstream: early out on headers when determining packet duration
authorVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Tue, 22 Nov 2011 12:00:58 +0000 (12:00 +0000)
committerVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Tue, 22 Nov 2011 12:00:58 +0000 (12:00 +0000)
ext/ogg/gstoggstream.c

index e56e561..ac4ae34 100644 (file)
@@ -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;