Open jangler opened 6 years ago
This looks like a taglib problem, I can reproduce it at that level.
#include <iostream>
#include <taglib/fileref.h>
int main(int argc, char **argv) {
if (argc != 2) {
std::cout << "usage: " << argv[0] << " file.ogg" << std::endl;
exit(1);
}
const char *filename = argv[1];
TagLib::FileRef file(filename);
std::cerr << "saving " << filename << " with taglib." << std::endl;
if (!file.save()) {
std::cerr << "file save failed" << std::endl;
exit(1);
}
}
@jangler I don't think this has anything to do with taglib-ruby. I can reproduce your error by compiling the file above with TagLib 1.11 (MacPorts) and running it on one of your OGG files.
I suspected that might be the case, but I've never used TagLib itself so I reported the issue here. But I would say that this does have a good deal to do with taglib-ruby, since taglib-ruby currently propogates this serious bug and does not in any way document it. There's no telling when the bug will be fixed in TagLib itself (which has not been updated in four months despite many open PRs) or when the fixed version of TagLib will become available in various package manager repos, so it's possible for taglib-ruby to intervene in the interim, if the developers so desire.
I will open an issue for this in the TagLib issue tracker, since it doesn't look like one currently exists.
Edit: Here it is: https://github.com/taglib/taglib/issues/864
Thanks for posting an issue upstream @jangler.
so it's possible for taglib-ruby to intervene in the interim, if the developers so desire
I don't think we have a good way to do that, except for not allowing to save ogg files at all.. Open for ideas though.
Looks like the upstream issue has been resolved, I think we can close this now?
This doesn't happen with all Ogg Vorbis files, but it does with these two that someone else provided: https://github.com/jangler/taffy/files/1844917/files.zip
In
irb
:Afterward,
ffprobe
saysfilename.ogg: End of file
,soxi
sayssoxi FAIL formats: can't open input file 'filename.ogg': Input not an Ogg Vorbis audio stream
, andmpv
saysFailed to recognize file format.
.