#761240 libsndfile1-dev: fails with multipart Ogg/Vorbis files

Package:
libsndfile1
Source:
libsndfile
Description:
Library for reading/writing audio files
Submitter:
Frank Heckenbach
Date:
2024-07-03 16:15:05 UTC
Severity:
normal
Tags:
#761240#5
Date:
2014-09-11 22:53:10 UTC
From:
To:
Ogg/Vorbis files can consist of multiple parts, simply concatenated
together:

% head -c 10000 /dev/zero | oggenc -r - -o foo.ogg
% head -c 10000 /dev/zero | oggenc -r - -o bar.ogg
% cat foo.ogg bar.ogg > baz.ogg

But libsndfile doesn't handle those files correctly. While it shows
the correct size:

% sndfile-info baz.ogg
[...]
Frames      : 5000
Channels    : 2

It only reads the frames of the first part (the bug is in the
library, not in sndfile-convert; I get the same result with my own
programs using the library):

% sndfile-convert -pcm16 baz.ogg baz.wav
% sndfile-info baz.wav
[...]
Frames      : 2500
Channels    : 2

To fix it, when using libvorbisfile, one would just check the result
of ov_read_* for OV_HOLE and retry, but libsndfile doesn't use
libvorbisfile, but a lower-level interface ...

#761240#8
Date:
2017-05-31 13:30:40 UTC
From:
To:
i've forwarded this issue to the upstream tracker:
https://github.com/erikd/libsndfile/issues/277