]> git.tuebingen.mpg.de Git - paraslash.git/commit - opus_afh.c
opus_afh: Use custom header API to strip comment packet.
authorAndre Noll <maan@tuebingen.mpg.de>
Mon, 17 Jul 2017 21:07:06 +0000 (23:07 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Sat, 22 Jul 2017 14:34:25 +0000 (16:34 +0200)
commit7b59c6078d59073e50be72f6eaee2100a26a2337
treeb28c1402b6dc455c03003106524b75dce3cdf1dd
parentc8466194a4842e319abdedfb38ddc93630e25471
opus_afh: Use custom header API to strip comment packet.

Currently we define the header of an ogg/opus file as the first two ogg
pages. This is problematic for two reasons: (a) the metadata packet
(ogg packet #2) may be arbitrary large and should not be sent over
the network as it is not needed for decoding the audio stream, and (b)
the second ogg page may contain, in addition to the metadata packet,
opus encoded audio packets which should not be part of the header.

This patch employs the recently added custom header API to avoid both
problems in the same way the ogg/vorbis audio format handler does:
we create a custom header which contains the unmodified ID header
packet and a dummy metadata packet.
opus_afh.c