Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Bugs
  • Category Music playback
  • Assigned To No-one
  • Operating System All players
  • Severity High
  • Priority Very Low
  • Reported Version
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by tmal - 2006-06-21

FS#5582 - Buffer desync and wrong recalculation of filebufused

Recalculation of filebufused in codec_discard_codec_callback() is clearly wrong. It should be based on buf_ridx and buf_widx not track_ridx and track_widx.

I am not yet familiar with the code enough, but I suppose that a buffer desync should not happen in first place. Anyway, here is a way to produce a desync (tested in simulator only):
Put two files, shorter than the codec buffer, in different formats (eg. mp3 and ogg) to one directory. Start playing one of them, skip to the next one, skip back to the first one and once again skip to the second one. Buffer desync should happen because discard_codec assumes there is no codec in the buffer (cur_ti→has_codec is false). Incorrectly recalculated filebufused will cause problems when all the data from the codec buffer will be played. End of buffered data will not be noticed because of incorrect value of filebufused.

Closed by  rasher
2006-10-12 21:38
Reason for closing:  Fixed
Additional comments about closing:   Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407

Submitter reports that this issue has been fixed.

Hi Tomasz,

This report seems to be out of date; codec_discard_codec_callback() is now only using buf_ridx. Please could you recheck.

tmal commented on 2006-10-12 20:10

Yes, it has been fixed.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing