• Marton Balint's avatar
    fftools/ffmpeg_demux: honor -ch_layout options for overriding input stream channel layout · 4bfecde9
    Marton Balint authored
    The code only set the channel layout of the AVFormatContext, so the user could
    not override the channel layout if the demuxer did not have such parameter.
    
    This used to work via the respective AVCodecContext option, but since
    639c2f00 it no longer gets passed to the
    decoders. It is actually better if we set it manually, instead of using the
    codec option because that way we can also override it on the stream level, so
    it will also work for stream copy or bitstream filtering.
    
    We don't allow changing the number of channels, because that can cause
    unexpected results. We disable layout guessing, if a channel layout is
    specified.
    
    Fixes ticket #11016.
    Signed-off-by: 's avatarMarton Balint <cus@passwd.hu>
    4bfecde9
ffmpeg_demux.c 64.2 KB