• Mark Harris's avatar
    avformat/oggparseopus: fix segmented timestamps · 26245187
    Mark Harris authored
    Fix timestamp calculation for code 3 Ogg Opus packets with less than
    2 bytes in the last segment (e.g. packet length 255 or 256).
    A sample that would seek incorrectly in ffplay can be created with:
      ffmpeg -i in.wav -b:a 34k -vbr off -frame_duration 60 out.opus
    and libopus 1.1
    
    Also do not read past the end of the buffer when a packet has length 0.
    Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
    26245187
oggparseopus.c 5.56 KB