<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt">Thanks for the link and update!<br><div><span><br></span></div><div><br></div>  <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <hr size="1">  <font face="Arial" size="2"> <b><span style="font-weight:bold;">From:</span></b> Sander Jansen <s.jansen@gmail.com><br> <b><span style="font-weight: bold;">To:</span></b> harish jenny <harishjennykn@yahoo.com>; taglib-devel@kde.org <br> <b><span style="font-weight: bold;">Sent:</span></b> Thursday, 22 August 2013 8:06 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: APETag parsing in MPEGfile.cpp<br> </font> </div> <div class="y_msg_container"><br><div id="yiv1280818267"><div dir="ltr"><br><div
 class="yiv1280818267gmail_extra"><br><br><div class="yiv1280818267gmail_quote">On Thu, Aug 22, 2013 at 7:48 AM, harish jenny <span dir="ltr"><<a rel="nofollow" ymailto="mailto:harishjennykn@yahoo.com" target="_blank" href="mailto:harishjennykn@yahoo.com">harishjennykn@yahoo.com</a>></span> wrote:<br>

<blockquote class="yiv1280818267gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex;"><div><div style="font-size:12pt;">

Hi,<br><br>I have a file which has APEtag as well as Id3V1 tag.<br><br>However , <span style="font-weight:bold;">MPEG::File::findAPE()</span> function is not able to detect APE footerLocation.<br><br>When I add the code something like - <br>

<br>    seek(d->hasID3v1 ? -160 : -32, End);<br><br>    long p = tell();<br><br>    if(readBlock(8) == APE::Tag::fileIdentifier()) {<br>      d->APEFooterLocation = p;<br>      seek(d->APEFooterLocation);<br>      APE::Footer footer(readBlock(APE::Footer::size()));<br>

      d->APELocation = d->APEFooterLocation - footer.completeTagSize()<br>    + APE::Footer::size();<br>     
 return;<br>    }<span style="font-weight:bold;"><br>  ++  else<br>  ++  {<br>  ++      seek(!d->hasID3v1 ? -160 : -32, End);<br><br>++       long p = tell();<br><br>++        if(readBlock(8) == APE::Tag::fileIdentifier()) {<br>

++          d->APEFooterLocation = p;<br>++          seek(d->APEFooterLocation);<br>++          APE::Footer footer(readBlock(APE::Footer::size()));<br>++          d->APELocation = d->APEFooterLocation - footer.completeTagSize()<br>

++        + APE::Footer::size();<br>++          return;<br>++        }<br>++    }</span><br><br>it is
 able to parse APEtag. <br><br>Does the standard say , if ID3V1 tag is present , then check for APETAGEX in -160 location from end ?<br></div></div></blockquote><div><br></div><div><br></div><div>According to this:</div>

<div><a rel="nofollow" target="_blank" href="http://wiki.hydrogenaudio.org/index.php?title=APEv2_specification">http://wiki.hydrogenaudio.org/index.php?title=APEv2_specification</a><br></div><div><br></div><div>The id3v1 tag should come last. I don't think you'll find many players that can support a id3v1 tag not located at the end. </div>

<div><br></div><div><br></div><blockquote class="yiv1280818267gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex;"><div><div style="font-size:12pt;">
Is it fine to parse again from -32 location since I was able to find proper metadata?<br></div></div></blockquote><div><br></div><div>No, as a matter of fact, if you can read a id3v1 tag at -128 and read a apetag at -32, it means the file is most likely broken (ie. overlapping tags, id3v1 is truncated by the apetag).<br>
</div><div><br></div><div>Cheers,</div><div><br></div><div>Sander</div><div><br></div><div> </div></div></div></div>
</div><br><br></div> </div> </div>  </div></body></html>