Oh. Thanks for clearing things up, Laurent.
I tried reproducing the error, I replaced
testVid = new SFMLTheora::Video();
if (testVid == NULL)
return 1;
with
auto testVid = std::make_shared<SFMLTheora::Video>()
I replaced the line
delete testVid;
with
testVid->Release;
and the code ran smooth without heap corruption.
I reread your post and noticed you mentioned
allways causes a heap corruption when shared_ptr is being deleted
I suspect what you did was replacing
delete testVid;
with
delete testVid.get();
instead.
I tried doing that and I got the heap corruption you're talking about.
After some reading, I found that a shared_ptr doesn't need to be deleted as it will be deleted when it goes out of scope, reassigned, or resetted.
The problem here is that, it is deleted twice: Once when you call delete testVid.get(); And once more when testVid goes out of scope(at the end of your program), since the pointer isn't set to NULL.
So the correct way to use it is to either totally skip the deleting part, or replace it with testVid->Release().
Anyway, I just remembered what happened to the OnSeek function, here's the story:
It was when I was making some major changes to the code, I found this OnSeek function that isn't used at all, so I thought it was just some mistake and removed it, woops. xD
Anyway, I've uploaded SFMLTheora 1.2.1 which contains the OnSeek function, thanks for notifying me about this.