The generated f_decoder_wrapper patch only switched to ad_joc when the
codec was E-AC-3. ad-joc-pcm=yes was read by the decoder but never had any
effect, because PCM/FLAC/TrueHD inputs still went to the default lavc
decoder.
Read ad_joc_params through mp_get_config_group(ad_joc_conf) and include
audio/decode/ad_joc.h in f_decoder_wrapper.c. Accessing p->opts for this
was wrong: p->opts is dec_wrapper_opts, not the global MPOpts, and the
build failed with "struct dec_wrapper_opts has no member named
ad_joc_params".
With this change, ad-joc-pcm=yes routes non-E-AC-3 codecs into ad_joc;
with no or the option absent, PCM is released to the default decoder.
E-AC-3 JOC is unchanged.
Rebuild mpv after this change; existing binaries still contain the old
eac3-only routing.
The generated f_decoder_wrapper patch only switched to ad_joc when the
codec was E-AC-3. ad-joc-pcm=yes was read by the decoder but never had
any effect, because PCM/FLAC/TrueHD inputs were still handed to the
default lavc decoder.
Extend the wrapper condition to select ad_joc for non-E-AC-3 codecs when
ad_joc_params->pcm is enabled. With ad-joc-pcm=no (or the option absent)
those inputs continue through the default decoder. The E-AC-3 JOC path
is unchanged.
Include audio/decode/ad_joc.h in f_decoder_wrapper.c so the generated
code can access ad_joc_params->pcm; options.h only forward-declares the
struct. Rebuild mpv after this change; existing binaries still contain
the old eac3-only routing.