streaming detection based on SEEK_END, tested and working in MediaPlayer for ogg streams from SoundPlay live encoder (oggenc)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6614 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
cd58ac9968
commit
56b91b1a41
@ -184,6 +184,15 @@ get_seekable(BDataIO * data)
|
||||
// really screwed
|
||||
return 0;
|
||||
}
|
||||
// next try to seek to the end of the stream (absolutely)
|
||||
if (seekable->Seek(0, SEEK_END) < 0) {
|
||||
return 0;
|
||||
}
|
||||
// then seek back to where we started
|
||||
if (seekable->Seek(current, SEEK_SET) < 0) {
|
||||
// really screwed
|
||||
return 0;
|
||||
}
|
||||
return seekable;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user