AW: [ID3 Dev] Purpose of Unsynchronization flag on ID3v24 tag header ?

Paul Taylor paul_t100 at fastmail.fm
Sun Apr 8 03:26:49 PDT 2007


ok i'll summarize, you have three options on a frame basis

1. Dont unsynchronize it, (the preferred option)
2. Unsynchronize it regardless of its contents and set the flag
3. Unsynchronize it only if unsynchronization is required, and set the flag

Only set the tag flag if you did option 2 (3 is theoretically possible 
but unlikely)

However it never occurred to me that you could unsynchronize by simply 
replace all occurences of FF with FF 00. What I do is iterate though the 
data looking for
an 0xFF, then if the next byte is 0xE0 (or greater) I insert an Ox00, or 
if the next byte is 0x00 I insert an additional 0x00, this method seems 
to be what the Spec describes.
This method  increases  the time to encode but reduces the time to 
decode but I cant see that it matters which way you do.


Paul


Ben Bennett wrote:
> On Fri, Apr 06, 2007 at 03:16:30PM +0000, Mathias Kunter wrote:
>   
>> It is safe to insert a 00 byte after every FF byte WHEN applying the
>> unsync scheme. As Ben said, this may also inserts a 00 byte where
>> not really nescessary, but it is easier to implement and also works
>> fine because a decoder has to replace EVERY $FF $00 byte sequence.
>>     
>
> Just to clarify what I think we are both trying to get across... 
>
> If you are doing unsync... then you MUST insert $00 after all $FFs.
> This is mandatory regarless of whether it is needed.  The only point I
> was trying to make was unsync may change places that are actually
> syncsafe.
>
> 			   -ben
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: id3v2-unsubscribe at id3.org
> For additional commands, e-mail: id3v2-help at id3.org
>
>
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: id3v2-unsubscribe at id3.org
For additional commands, e-mail: id3v2-help at id3.org



More information about the ID3v2 mailing list