[MPlayer-dev-eng] [PATCH] Fix af_lavcresample to use the new ch_layout scheme.
Ivan Kalvachev
ikalvachev at gmail.com
Sun Apr 7 15:14:09 EEST 2024
Just like the rest of FFmpeg 7.x swresample library doesn't accept
"number of channels" as separate parameter anymore and requires it to
be part of channel layout structure that also describes the audio
speakers layout.
While Alexander Strasser's (beastd) patch series mostly fix this kind
of change in other parts of the code, here it remained unnoticed
because it doesn't cause compilation failure.
The existing af_lavcresample code uses av_opt_set*() and because of
that the errors are returned at runtime.
Since lavresample is automatically inserted to change the sample rate
(e.g. 44100->48000) it caused some videos to lose sound entirely.
To fix it, I'm just getting the default channel layout for the given
number of channels. It's the simplest code that makes it work.
This together with the change of ad_ffmpeg.c patch let's me play
everything so far.
Best Regards
Ivan Kalvachev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lavcresample_chlayout.patch
Type: text/x-patch
Size: 1690 bytes
Desc: not available
URL: <https://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20240407/37b702a7/attachment.bin>
More information about the MPlayer-dev-eng
mailing list