forked from mia/Aegisub
FFMS2: Add a missing function the updated matroska parser expects
Originally committed to SVN as r2890.
This commit is contained in:
parent
35cea05304
commit
94cf1e4c22
2 changed files with 19 additions and 7 deletions
|
@ -98,6 +98,15 @@ int StdIoProgress(StdIoStream *st, ulonglong cur, ulonglong max) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
longlong StdIoGetFileSize(StdIoStream *st) {
|
||||
longlong epos = 0;
|
||||
longlong cpos = _ftelli64(st->fp);
|
||||
_fseeki64(st->fp, 0, SEEK_END);
|
||||
epos = _ftelli64(st->fp);
|
||||
_fseeki64(st->fp, cpos, SEEK_SET);
|
||||
return epos;
|
||||
}
|
||||
|
||||
void InitStdIoStream(StdIoStream *st) {
|
||||
memset(st,0,sizeof(st));
|
||||
st->base.read = StdIoRead;
|
||||
|
@ -108,4 +117,5 @@ void InitStdIoStream(StdIoStream *st) {
|
|||
st->base.memrealloc = StdIoRealloc;
|
||||
st->base.memfree = StdIoFree;
|
||||
st->base.progress = StdIoProgress;
|
||||
st->base.getfilesize = StdIoGetFileSize;
|
||||
}
|
||||
|
|
|
@ -75,6 +75,8 @@ void StdIoFree(StdIoStream *st, void *mem);
|
|||
*/
|
||||
int StdIoProgress(StdIoStream *st, ulonglong cur, ulonglong max);
|
||||
|
||||
longlong StdIoGetFileSize(StdIoStream *st);
|
||||
|
||||
void InitStdIoStream(StdIoStream *st);
|
||||
|
||||
#endif /* #ifndef STDIOSTREAM_H */
|
||||
|
|
Loading…
Reference in a new issue