leduycuong86 / mp4parser

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

AbstractAppleMetaDataBox.setValue() not working correctly #10

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I noticed that writing a value "9" to a AppleMediaTypeBox, always results in 
"0" getting written. I've tracted this now to the what I think is a problem in 
AbstractAppleMetaDataBox.setValue(). If the section where 
appleDataBox.getFlags() == 2, it writes the correct content to a 
ByteArrayOutputStream(). However it never writes the contents of this to the 
box.

If I change line 109 from:

appleDataBox.setContent(content);

to:

appleDataBox.setContent(baos.toByteArray());

it fixes the problem for me. I've attached a patch to this issue.

I'm using the latest SVN checkout (at the time of creating this issue).

Original issue reported on code.google.com by jp.stanf...@gmail.com on 5 May 2011 at 8:26

Attachments:

GoogleCodeExporter commented 9 years ago
Hi JP, 

sorry for answering that late. Somehow I do not get notifications on new bugs. 

Your patch is absolutely right! It's applied in the trunk but not in beta-3. 
Since I didn't work on the issues I will probably re-release in a week or two.

Best Regards,
Sebastian

Original comment by Sebastian.Annies on 24 Jun 2011 at 2:43