• wm4's avatar
    aacdec: do not mutate input packet metadata · fcfc78cb
    wm4 authored
    Apparently the demuxer outputs the wrong padding for HE-AAC (based on
    the raw sample rate, or so). aacdec contains a hack to adjust the muxer
    padding accordingly before it's used to trim the decoder output. This
    modified the packet side data, which in combination with the old
    decoding API would change the packet the user passed to the decoder.
    This is clearly not allowed, and it breaks running some gapless fate
    tests with "-fflags +keepside" applied (without keepside, the packet
    metadata is typically newly allocated, essentially making a copy and not
    modifying the user's input packet).
    
    This should probably be fixed in the demuxer (and consequently also the
    muxer), but for now only fix the immediate problem.
    
    Regression since 946ed78f (2012).
    fcfc78cb
internal.h 11.5 KB