[Libav-user] RTP Opus demuxer is missing extradata with Opus header
jon at jonb.org
Sun Nov 1 03:52:52 EET 2020
On Sat, Oct 31, 2020, at 12:18 PM, Carl Eugen Hoyos wrote:
> Opus is always 48kHz.
> I don't remember why there was an issue but does the patch help in your case?
> There is something wrong with your quoting, Carl Eugen
That is very interesting about Opus's sample rate! For anyone else reading: Opus supports several input sample rates, but the output of a decoder is fixed at 48khz. The sample rate in the header is an informational only reference to the input sample rate.
Anyway, your patch does solve my problem. I was also able to reproduce Juan Navarro's issue with OGG/WEBM. These files played in ffplay, but not in VLC, which reported a corrupted opus header.
The opus_default_extradata datastructure is 30 bytes long. I modified your patch to only copy 19 bytes, which is the size of a standard opus header. This seemed to resolve the issue and I was able to playback the OGG/WEBM files in VLC.
It might be a good idea to change the original datastructure to 19 bytes, but that datastructure is also shared by libavformat/mpegts.c and I don't know if that will add any issues.
Thanks for your help, I hope we can get this patch merged into the next release.
I changed my email client to send plain-text. I hope that fixes any quoting issues.
More information about the Libav-user