mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-03 13:02:29 +00:00
oggstream: early out on headers when determining packet duration
This commit is contained in:
parent
e05f1df04b
commit
ceee36195a
1 changed files with 4 additions and 0 deletions
|
@ -1895,6 +1895,10 @@ packet_duration_opus (GstOggStream * pad, ogg_packet * packet)
|
||||||
if (packet->bytes < 1)
|
if (packet->bytes < 1)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
/* headers */
|
||||||
|
if (packet->bytes >= 8 && !memcmp (packet->packet, "Opus", 4))
|
||||||
|
return 0;
|
||||||
|
|
||||||
toc = packet->packet[0];
|
toc = packet->packet[0];
|
||||||
|
|
||||||
frame_duration = durations[toc >> 3] * 1000;
|
frame_duration = durations[toc >> 3] * 1000;
|
||||||
|
|
Loading…
Reference in a new issue