mirror of
https://github.com/taglib/taglib.git
synced 2025-05-27 21:20:26 -04:00
Don't wrote the Vorbis framing bit to OggFLAC files
https://bugs.launchpad.net/maxosx/+bug/445970 http://www.hydrogenaudio.org/forums/index.php?showtopic=75263 CCMAIL:me@sbooth.org git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@1039704 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
This commit is contained in:
parent
03c63a11a5
commit
724a68c79c
@ -93,7 +93,7 @@ Properties *Ogg::FLAC::File::audioProperties() const
|
||||
|
||||
bool Ogg::FLAC::File::save()
|
||||
{
|
||||
d->xiphCommentData = d->comment->render();
|
||||
d->xiphCommentData = d->comment->render(false);
|
||||
|
||||
// Create FLAC metadata-block:
|
||||
|
||||
|
@ -14,6 +14,8 @@ INCLUDE_DIRECTORIES(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../taglib/trueaudio
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../taglib/ogg
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../taglib/ogg/vorbis
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../taglib/ogg/flac
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../taglib/flac
|
||||
)
|
||||
|
||||
SET(test_runner_SRCS
|
||||
@ -33,6 +35,7 @@ SET(test_runner_SRCS
|
||||
test_aiff.cpp
|
||||
test_riff.cpp
|
||||
test_ogg.cpp
|
||||
test_oggflac.cpp
|
||||
)
|
||||
IF(WITH_MP4)
|
||||
SET(test_runner_SRCS ${test_runner_SRCS} test_mp4.cpp)
|
||||
|
@ -7,6 +7,8 @@ INCLUDES = \
|
||||
-I$(top_srcdir)/taglib/mpeg/id3v2 \
|
||||
-I$(top_srcdir)/taglib/ogg \
|
||||
-I$(top_srcdir)/taglib/ogg/vorbis \
|
||||
-I$(top_srcdir)/taglib/ogg/flac \
|
||||
-I$(top_srcdir)/taglib/flac \
|
||||
-I$(top_srcdir)/taglib/riff \
|
||||
-I$(top_srcdir)/taglib/riff/aiff \
|
||||
-I$(top_srcdir)/taglib/mpeg/id3v2/frames
|
||||
@ -26,7 +28,8 @@ test_runner_SOURCES = \
|
||||
test_xiphcomment.cpp \
|
||||
test_riff.cpp \
|
||||
test_aiff.cpp \
|
||||
test_ogg.cpp
|
||||
test_ogg.cpp \
|
||||
test_oggflac.cpp
|
||||
|
||||
if build_tests
|
||||
TESTS = test_runner
|
||||
|
BIN
tests/data/empty_flac.oga
Normal file
BIN
tests/data/empty_flac.oga
Normal file
Binary file not shown.
BIN
tests/data/empty_vorbis.ogg
Normal file
BIN
tests/data/empty_vorbis.ogg
Normal file
Binary file not shown.
44
tests/test_oggflac.cpp
Normal file
44
tests/test_oggflac.cpp
Normal file
@ -0,0 +1,44 @@
|
||||
#include <cppunit/extensions/HelperMacros.h>
|
||||
#include <string>
|
||||
#include <stdio.h>
|
||||
#include <tag.h>
|
||||
#include <tstringlist.h>
|
||||
#include <tbytevectorlist.h>
|
||||
#include <oggfile.h>
|
||||
#include <oggflacfile.h>
|
||||
#include "utils.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace TagLib;
|
||||
|
||||
class TestOggFLAC : public CppUnit::TestFixture
|
||||
{
|
||||
CPPUNIT_TEST_SUITE(TestOggFLAC);
|
||||
CPPUNIT_TEST(testFramingBit);
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
public:
|
||||
|
||||
void testFramingBit()
|
||||
{
|
||||
string newname = copyFile("empty_flac", ".oga");
|
||||
|
||||
Ogg::FLAC::File *f = new Ogg::FLAC::File(newname.c_str());
|
||||
f->tag()->setArtist("The Artist");
|
||||
f->save();
|
||||
delete f;
|
||||
|
||||
f = new Ogg::FLAC::File(newname.c_str());
|
||||
CPPUNIT_ASSERT_EQUAL(String("The Artist"), f->tag()->artist());
|
||||
|
||||
f->seek(0, File::End);
|
||||
int size = f->tell();
|
||||
CPPUNIT_ASSERT_EQUAL(9134, size);
|
||||
|
||||
delete f;
|
||||
//deleteFile(newname);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION(TestOggFLAC);
|
Loading…
Reference in New Issue
Block a user