Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seek failed in asftest #1

Closed
dokinkon opened this issue May 22, 2012 · 3 comments
Closed

Seek failed in asftest #1

dokinkon opened this issue May 22, 2012 · 3 comments

Comments

@dokinkon
Copy link

Hi,

In asf.c, asf_seek_to_msec(), I found a small issue with following code:

seek_position = file->iostream.seek(file->iostream.opaque, new_position);
if (seek_position < 0 || (uint64_t)seek_position != new_position) {
return ASF_ERROR_SEEK;
}

Since fseek return "0" for successful operation, so "seek_position" == 0
and above condition test always failed.

Thank you.

@juhovh
Copy link
Owner

juhovh commented May 22, 2012

Good point, I've been using the libasf code mostly for parsing audio files and in those cases I've supplied custom iostream callbacks. The file example hasn't been tested much, I'll fix this. Thank you!

@juhovh
Copy link
Owner

juhovh commented May 22, 2012

Please check if commit 93152f1 fixes the issue.

@dokinkon
Copy link
Author

I think this issue is ok. Thank you
libasf is really awesome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants