• Karsten Otto's avatar
    aadec: improve seeking in mp3 content · c5329d64
    Karsten Otto authored
    MP3 frames may not be aligned to aa chunk boundaries. When seeking,
    calculate the expected frame offset in the target chunk. Adjust the
    timestamp and truncate the next packet accordingly.
    
    This solution works for the majority of tested audio material. For
    some rare encodings with mp3 padding or embedded id3 tags, it will
    mispredict the correct offset, and at worst skip an extra frame.
    Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
    c5329d64
aadec.c 14.4 KB