summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
authorkonablend <[email protected]>2009-05-29 18:36:26 +0000
committerkonablend <[email protected]>2009-05-29 18:36:26 +0000
commit51a964885989e0feabbab572c4f1203306eeeca4 (patch)
tree4a717aff0d3a3966a20662de00745b85fc82a611 /libhb
parentb219795bd674e1c567775d5478cba7bbe88aa0b0 (diff)
mp4 cleanups
- removed unused ipoutil.cpp; has been incorporated into mp4v2 some time ago. - changed hard-coded buffer sizes to use sizeof. - bump mp4v2 r349 -> r355; has bugfixes which prevents read-in errors. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2462 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb')
-rw-r--r--libhb/decmetadata.c14
-rw-r--r--libhb/ipodutil.cpp34
2 files changed, 7 insertions, 41 deletions
diff --git a/libhb/decmetadata.c b/libhb/decmetadata.c
index 754eb7a25..df0c5b3ef 100644
--- a/libhb/decmetadata.c
+++ b/libhb/decmetadata.c
@@ -28,26 +28,26 @@ static void decmp4metadata( hb_title_t *title )
if( tags->name ) {
hb_deep_log( 2, "Metadata Name in input file is '%s'", tags->name );
- strncpy( title->metadata->name, tags->name, 255 );
+ strncpy( title->metadata->name, tags->name, sizeof(title->metadata->name) );
}
if( tags->artist )
- strncpy( title->metadata->artist, tags->artist, 255 );
+ strncpy( title->metadata->artist, tags->artist, sizeof(title->metadata->artist) );
if( tags->composer )
- strncpy( title->metadata->composer, tags->composer, 255 );
+ strncpy( title->metadata->composer, tags->composer, sizeof(title->metadata->composer) );
if( tags->comments )
- strncpy( title->metadata->comment, tags->comments, 1024 );
+ strncpy( title->metadata->comment, tags->comments, sizeof(title->metadata->comment) );
if( tags->releaseDate )
- strncpy( title->metadata->release_date, tags->releaseDate, 255 );
+ strncpy( title->metadata->release_date, tags->releaseDate, sizeof(title->metadata->release_date) );
if( tags->album )
- strncpy( title->metadata->album, tags->album, 255 );
+ strncpy( title->metadata->album, tags->album, sizeof(title->metadata->album) );
if( tags->genre )
- strncpy( title->metadata->genre, tags->genre, 255 );
+ strncpy( title->metadata->genre, tags->genre, sizeof(title->metadata->genre) );
if( tags->artworkCount > 0 ) {
const MP4TagArtwork* art = tags->artwork + 0; // first element
diff --git a/libhb/ipodutil.cpp b/libhb/ipodutil.cpp
deleted file mode 100644
index ba37e4768..000000000
--- a/libhb/ipodutil.cpp
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * MP4 library API functions
- *
- * These are wrapper functions that provide C linkage conventions
- * to the library, and catch any internal errors, ensuring that
- * a proper return value is given.
- */
-
-#include "mp4common.h"
-
-static u_int8_t ipod_magic[] = {
- 0x6b, 0x68, 0x40, 0xf2, 0x5f, 0x24, 0x4f, 0xc5,
- 0xba, 0x39, 0xa5, 0x1b, 0xcf, 0x03, 0x23, 0xf3
-};
-
-class IPodUUIDAtom : public MP4Atom {
-public:
- IPodUUIDAtom() : MP4Atom("uuid")
- {
- SetExtendedType(ipod_magic);
-
- MP4Integer32Property* value = new MP4Integer32Property("value");
- value->SetValue(1);
- AddProperty(value);
- }
-};
-
-extern "C" void AddIPodUUID(MP4FileHandle hFile, MP4TrackId trackId)
-{
- MP4Track* track = ((MP4File*)hFile)->GetTrack(trackId);
- MP4Atom* avc1 = track->GetTrakAtom()->FindChildAtom("mdia.minf.stbl.stsd.avc1");
- avc1->AddChildAtom(new IPodUUIDAtom());
-}
-