aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/srtpproto.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-08-29 23:00:48 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-09-05 20:33:59 +0200
commitbe0a2515ab25e4531464f84c4c4d5a97e1a3e8ef (patch)
tree03fe32087880f310eb513aa2013906231d9e5c4e /libavformat/srtpproto.c
parent7bacef580f81ab7a98401b9b05441115df36d86b (diff)
downloadffmpeg-be0a2515ab25e4531464f84c4c4d5a97e1a3e8ef.tar.gz
avformat/matroskaenc: Don't override samplerate for CodecDelay
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 commit c3c22bee6362737cf290929b7f31df9fb88da983, 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 commit f4bdeddc3cab807e43e0450744dfe9a45661e1d7 fixed the issue in libopusenc; so the OpusHead is correct, but the CodecDelay is still off*. This commit fixes this by effectively reverting c3c22bee6362737cf290929b7f31df9fb88da983. *: Firefox seems to no longer abort when CodecDelay and OpusHead are off. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/srtpproto.c')
0 files changed, 0 insertions, 0 deletions