Decoding of chained opus streams isn't properly supported
|Reported by:||neknek446||Owned by:|
|Cc:||email@example.com, firstname.lastname@example.org||Blocked By:|
|Blocking:||Reproduced by developer:||no|
|Analyzed by developer:||no|
Summary of the bug:
ffmpeg currently doesn't support chained opus streams (as specified in <https://tools.ietf.org/html/rfc7845.html#section-7.2>).
When decoding opus stream with
OpusTags packets not in begining of overall stream, it produces "Error parsing the packet header." error messages and crack noises, and also doesn't update tags.
For opus stream chaining to work, opus decoder (libavformat/oggparseopus.c) should:
OpusHeadpackets (including discarding pre-skip ammount of samples). It currently handles this well only in opus_header function.
OpusTagspackets (including updating metadata). It currently handles this well only in opus_header function.
- handle EOS-marked packets with granule position smaller than last granule position + ammount of samples contained in packet by discarding excess decoded samples. I looked at code and it seems to currently do this already.
How to reproduce:
wget https://jmvalin.ca/misc_stuff/chain_works.opus ffmpeg -i chain_works.opus chain_works.wav
Also relevant VLC ticket: <https://trac.videolan.org/vlc/ticket/18401>.