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 e56e5611818f98312deee5a85b65c14bac09e799..ac4ae34d0d5c7cd8aca04dc7d6f08fbf530b3b69 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;