This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#8092 - rebuffer_handle is hopelessly broken
Attached to Project:
Rockbox
Opened by Brandon Low (lostlogic) - Monday, 05 November 2007, 04:22 GMT+2
Last edited by Nicolas Pennequin (nicolas_p) - Monday, 26 November 2007, 22:14 GMT+2
Opened by Brandon Low (lostlogic) - Monday, 05 November 2007, 04:22 GMT+2
Last edited by Nicolas Pennequin (nicolas_p) - Monday, 26 November 2007, 22:14 GMT+2
|
Detailsrebuffer_handle for backwards seeks is hopelessly broken. it will only work in the very isolated case that there is no track after the playing track on buffer. Otherwise it will end up with a short allocation as it tries to rebuffer the new file from earlier than it was originally buffered.
I tried various solutions but none look good. First I tried to move it earlier on the buffer to make space. This doesn't work because if the buffer is filling we could be mid-read and could then put the current track back on space that is about to get overwritten. Even if the buffer is not filling, if there are any tracks on buffer earlier than the playing track then it can't safely move earlier. My next solution was to return an error code which tells playback that it needs to do a full rebuffer. I have a patch with this proposed solution (as well as an associated but not equivalent fix to put the PRESEEK functionality back into the world and manage it from the playback side. See attached patch, which breaks horribly and I don't see why. This FS is here for a tracker as either Nico or I get to fixing this for real. |
This task depends upon
Closed by Nicolas Pennequin (nicolas_p)
Monday, 26 November 2007, 22:14 GMT+2
Reason for closing: Fixed
Monday, 26 November 2007, 22:14 GMT+2
Reason for closing: Fixed
If it's doable, just do a complete rebuffer in this case. It's not often someone will rewind (or skip back?) before the start of buffered data, so not worth complicating the code to preserve later tracks.
Although ...Like I said, I probably don't understand the issue.... :)