mirror of https://github.com/FFmpeg/FFmpeg.git
Opus can be decoded to multiple samplerates (namely 48kHz, 24KHz, 16Khz, 12 KHz and 8Khz); libopus as well as our encoder wrapper support these sample rates. The OpusHead contains a field for this original samplerate. Yet the pre-skip (and the granule-position in the Ogg-Opus mapping in general) are always in the 48KHz clock, irrespective of the original sample rate. Before commitpull/388/headc3c22bee63
, our libopus encoder was buggy: It did not account for the fact that the pre-skip field is always according to a 48kHz clock and wrote a too small value in case one uses the encoder with a sample rate other than 48kHz; this discrepancy between CodecDelay and OpusHead led to Firefox rejecting such streams. In order to account for that, said commit made the muxer always use 48kHz instead of the actual sample rate to convert the initial_padding (in samples in the stream's sample rate) to ns. This meant that both fields are now off by the same factor, so Firefox was happy. Then commitf4bdeddc3c
fixed the issue in libopusenc; so the OpusHead is correct, but the CodecDelay is still off*. This commit fixes this by effectively revertingc3c22bee63
. *: Firefox seems to no longer abort when CodecDelay and OpusHead are off. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
parent
7bacef580f
commit
be0a2515ab
2 changed files with 2 additions and 2 deletions
Loading…
Reference in new issue