Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/MatroskaParser.c
Original file line number Diff line number Diff line change
Expand Up @@ -2250,7 +2250,7 @@ static void parseBlockGroup(MatroskaFile *mf,uint64_t toplen,uint64_t timecode,

// we want to still load these bytes into cache
for (v = filepos(mf) & ~0x3fff; v < len + dpos; v += 0x4000)
mf->cache->read(mf->cache,v,NULL,0); // touch page
mf->cache->read(mf->cache,v,NULL,0); // touch page (FIXME this doesn't really do anything)

skipbytes(mf,len - filepos(mf) + dpos);

Expand Down
7 changes: 6 additions & 1 deletion src/mkv_wrap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,13 @@ struct MkvStdIO final : InputStream {
if (remaining < INT_MAX)
count = std::min(static_cast<int>(remaining), count);

if (count <= 0)
return 0;

try {
memcpy(buffer, self->file.read(pos, count), count);
auto data = self->file.read(pos, count);
if (buffer)
memcpy(buffer, data, count);
}
catch (agi::Exception const& e) {
self->error = e.GetMessage();
Expand Down
Loading