Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Thank You for your continued support and contributions!

+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  Rockbox database with MP3s with large ID3 tags
« previous next »
  • Print
Pages: [1]

Author Topic: Rockbox database with MP3s with large ID3 tags  (Read 3040 times)

Offline rhinobanga

  • Member
  • *
  • Posts: 4
Rockbox database with MP3s with large ID3 tags
« on: May 24, 2009, 11:21:38 AM »
Hi Folks,

I asked RB to build it's DB cache on my 80GB iPod and noticed a few of my MP3 tracks were missing or "unassigned".

So I downloaded the source code, built the simulator and managed to reproduce the problem on one of my tracks.   Media players on my PC handled the track in question just fine so I hex edited the file to look at the tags.

I noticed that this track had a very large COMM tag right at the beginning, 1200 bytes.

Running the sim under gdb I noticed that the mp3.c:setid3v2title function used the entry->id3v2buf area for a buffer, which under the sim was 900 bytes.

However the code handled large frames by skipping (lseek) to the next one.

Then I noticed this code:

Code: [Select]
                /* Seek to the next frame */
                if(framelen < totframelen)
                    lseek(fd, totframelen - framelen, SEEK_CUR);


Which got me thinking, if the code seeks to a new position then the internal buffer and buffer position must be invalid but the buffer position is not being reset.

So as a test I changed the code to:

Code: [Select]
                /* Seek to the next frame */
                if(framelen < totframelen)
                {
                    lseek(fd, totframelen - framelen, SEEK_CUR);
                    bufferpos = 0;
                }


Which solved the problem.   Now my files are being properly tagged under RB.


Can someone confirm this is a valid change?



Regards,

Jamie.
Logged

Offline gevaerts

  • Administrator
  • Member
  • *
  • Posts: 1053
Re: Rockbox database with MP3s with large ID3 tags
« Reply #1 on: May 24, 2009, 06:11:44 PM »
Could you open a task on the tracker for this? This looks very promising, but I don't know this part of the code at all and lots of developers don't read the forums. I'd hate this to get lost.
Logged

Offline rhinobanga

  • Member
  • *
  • Posts: 4
Re: Rockbox database with MP3s with large ID3 tags
« Reply #2 on: May 25, 2009, 06:05:33 AM »
Done ... http://www.rockbox.org/tracker/task/10240
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  Rockbox database with MP3s with large ID3 tags
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.064 seconds with 15 queries.