[FFmpeg-devel] [PATCH] 1/6 Remove incorrect APE tag size adjustment based on flags

Matti Hamalainen mhamalai
Mon Aug 10 23:11:31 CEST 2009

On Mon, 10 Aug 2009, Kostya wrote:

> On Mon, Aug 10, 2009 at 12:41:24PM +0300, Matti Hamalainen wrote:
> > On Mon, 10 Aug 2009, Matti Hamalainen wrote:
> > 
> > > Remove incorrect tag size adjustment based on flags, the size already
> > > includes the whole tag, including footer.
> > 
> > Urgh, with the patch this time too .. this is embarrassing.
> Can you provide a sample to test this all?

Actually the Musepack sample files already in MPlayer sample archive are 
are applicable here. However, as they are MPC files, the other patches
need to be applied too for testing.


At least "03-Take A Chance On Me.mpc" contains a v1.x APE tag, which has
"contains a header" bit set. The current (incorrect) code would in this 
case seek to (file_size - tag_size - 2*APE_TAG_FOOTER_BYTES), which
is the first byte of the tag header "APETAGEX" string. But the tag item 
reading code expects the position to be on the first tag item.

states that "Tag size in bytes including footer and all tag items                                                          
excluding the header to be as compatible as possible with APE Tags 1.000".                                                 

There are also some APE files, which can be used to verify that this
change (or all of the patches together) introduce no regressions as
far as I am aware. Links to APE samples:


] ccr/TNSP^DKD^pWp  :: ccr tnsp org ::  http://ccr.tnsp.org/
] PGP key: 0466 95ED 96DF 3701 C71D D62D 10A6 28A6 1374 C112

More information about the ffmpeg-devel mailing list