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

Freeing SyntheticSampleTable #23

Closed
michaeljoelphillips opened this issue Sep 21, 2015 · 3 comments
Closed

Freeing SyntheticSampleTable #23

michaeljoelphillips opened this issue Sep 21, 2015 · 3 comments

Comments

@michaeljoelphillips
Copy link

Greetings,

I am encountering a Segfault when attempting to delete a pointer to a SyntheticSampleTable object. I am trying to cleanup inputs and a SampleTable for an application that processes multiple inputs when it Segfaults. I've done a few tests with the Mp4Mux application and can replicate the issue with the SyntheticSampleTable object there as well. I couldn't find any examples of what I'm needing so I'm not sure if deleteing the pointer is the right solution to being with.

Any and all help is appreciated!

@barbibulle
Copy link
Contributor

deleting a SyntheticSampleTable object is a valid operation. When you do this, it will decrement the ref count of all the AP4_Sample objects referenced by the table. So this may be a case of improper reference counting of sample data (maybe one-too-many call to Release()), but it could be a bug lurking somewhere in the SyntheticSampleTable code. If you can share a description of how to reproduce the issue, I can take a look.

@michaeljoelphillips
Copy link
Author

I think I actually found my issue. The AP4_Track was scoping out before I was deleting the SampleTable object. If I understand this correctly, the AP4_Track destructor frees the SampleTable object so it looks like I was trying to delete a pointer to an object that was already freed. If I have any other issues, I'll check back but it seems to have fixed it for now. Thanks for your help!

@barbibulle
Copy link
Contributor

Yes, the AP4_Track constructor takes ownership of the AP4_SampleTable that's passed to it.

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