littleblank / mp4v2

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

added image doesnt show in itunes #70

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. use mp4tags -P <image.png> <file>
2. open in itunes

What is the expected output? What do you see instead?
itunes does not recognize/display the embedded image

What version of the product are you using? On what operating system?
r393

Please provide any additional information below.
tried with the same png and mp4 with libmp4v2 1.5.0.1 which works fine

Original issue reported on code.google.com by bernhard...@gmail.com on 29 Sep 2010 at 3:21

GoogleCodeExporter commented 8 years ago
Do you know if it works with any previous versions of mp4v2 from here, like 
r355 or 1.9.1?

Original comment by kid...@gmail.com on 29 Sep 2010 at 9:10

GoogleCodeExporter commented 8 years ago
I first tried with 1.9.1 and had that very issue(thats why I tried with the 
latest trunk)

Original comment by bernhard...@gmail.com on 29 Sep 2010 at 9:19

GoogleCodeExporter commented 8 years ago
Okay, good to know.  a few other things you could try to help me get this fixed:

1. Could you try r355?
2. Could you attach the mp4 file and png to this thread so I can test?
3. Does it work with any other image types, like bmp or jpeg, or are they all 
broken?

Thanks!

Original comment by kid...@gmail.com on 29 Sep 2010 at 10:03

GoogleCodeExporter commented 8 years ago
I had some time to look into this today, and it turns out it was likely broken 
since r73.  In r73, File::Read() was changed to return false in the event of 
success, but this code in mp4tags.cpp was never updated to reflect the change:

                        File in( tags[i], File::MODE_READ );
                        if( !in.open() ) {
                            MP4TagArtwork art;
                            art.size = (uint32_t)in.size;
                            art.data = malloc( art.size );
                            art.type = MP4_ART_UNDEFINED;

                            File::Size nin;
                            if( !in.read( art.data, art.size, nin ) && nin == art.size ) {
                                if( mdata->artworkCount )
                                    MP4TagsRemoveArtwork( mdata, 0 );
                                MP4TagsAddArtwork( mdata, &art );
                            }

                            free( art.data );
                            in.close();

...the in.read() call will return false in the event of success, which means 
the artwork is never added.  So it just needs a "!".  This will be fixed in 
r394 (sorry, having some issues with source control at the moment, it's not 
cooperating...)

Original comment by kid...@gmail.com on 7 Oct 2010 at 1:28

GoogleCodeExporter commented 8 years ago
fixed in r394 - could you retest with trunk and let me know if it's fixed on 
your end?  Thanks!

Original comment by kid...@gmail.com on 7 Oct 2010 at 1:53

GoogleCodeExporter commented 8 years ago
thanks! works fine here!

Original comment by bernhard...@gmail.com on 7 Oct 2010 at 4:07