Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Fix the WaitData amount in CSimpleFileCache::Seek, count from read pos. #2300

Merged
merged 1 commit into from Feb 27, 2013

Conversation

Projects
None yet
2 participants
Contributor

ulion commented Feb 24, 2013

current code call WaitData with incorrect amount, it should count from read pos, not write pos.

this still checks "nDiff > 500000 || (nDiff > 0" is that still relevant ?

Owner

ulion replied Feb 24, 2013

the nDiff > 500000 is correct, it means it need more 500000 bytes to write in to fulfill the request amount bytes to read (this amount should count from read pos), it will not wait for nDiff>500000, and if nDiff less or equals 500000 and greater than 0, that means need wait data write in less or equals 500000 bytes, then it will wait, but the WaitForData input param should be the total bytes it needed counting from read pos.

@ulion ulion added a commit that referenced this pull request Feb 27, 2013

@ulion ulion Merge pull request #2300 from ulion/fix_simple_file_cache_seek_wait_d…
…ata_amount

Fix the WaitData amount in CSimpleFileCache::Seek, count from read pos.
a0e6bac

@ulion ulion merged commit a0e6bac into xbmc:master Feb 27, 2013

@ulion ulion deleted the ulion:fix_simple_file_cache_seek_wait_data_amount branch Apr 6, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment