• Martin Storsjö's avatar
    vocdec: Don't update codec parameters mid-stream · 5bbfe193
    Martin Storsjö authored
    If we really want to support parameter changes, they need to be
    signalled along with the AVPackets as parameter change side data,
    not just changing the AVCodecContext parameters when a packet
    is demuxed (since there may be other earlier packets yet undecoded).
    
    Something similar was already done for the sample rate in 0883109b
    
    ,
    but some parameters were left changeable.
    
    This avoids having to recheck the channel count for validity for
    each decoded frame in (ad)pcm decoders, unless the decoders
    explicitly say that they accept parameter changes.
    
    Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
    CC: libav-stable@libav.org
    Signed-off-by: default avatarMartin Storsjö <martin@martin.st>
    5bbfe193