SrsBusiness / mp4v2

Automatically exported from code.google.com/p/mp4v2
Other
0 stars 0 forks source link

MP4Modify fails to add metadata on an empty mp4-file #126

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I generated a clean mp4-file using ffmpeg. I wanted to add some iTunes 
metadata using MP4Modify and the generic interface. I used the 
MP4ItmfAddItem() function as described in the generic example, but it 
always returns FALSE on this file. If I use files already containing 
some iTunes tags, it works fine. 
I debugged the MP4ItmfAddItem() and found the line, where it fails. It 
is in generic.cpp/genericAddItem. The atom "mood.udta.meta.ilist" is 
missing. The tag Interface also fails on the test file.

 I sent you the test file by mail because I got error 400 from google sending the ticket with the attachment.

Thanks 

Holger 

bool 
genericAddItem( MP4File& file, const MP4ItmfItem* item ) 
{ 
    MP4Atom* ilst = file.FindAtom( "moov.udta.meta.ilst" ); // returns 
null 
    if( !ilst ) 
        return false; 
    MP4ItemAtom& itemAtom = *(MP4ItemAtom*)MP4Atom::CreateAtom( ilst, 
item->code ); 
    ilst->AddChildAtom( &itemAtom ); 
    return __itemModelToAtom( *item, itemAtom ); 

Version 1.9.0

Original issue reported on code.google.com by holgr.ja...@googlemail.com on 20 Dec 2011 at 10:29

GoogleCodeExporter commented 8 years ago
Could you retest with trunk?  Frankly, 1.9.0 contains enough bugs and issues 
that I don't recommend anyone use it, which is why it was removed from the 
front page a while back.  For now I'd suggest the 479 snapshot.  If you must 
use a bona-fide release, go with 1.9.1.

Original comment by kid...@gmail.com on 19 Mar 2012 at 2:39