The program exits abnormally
When the program exits abnormally, MP4E_close cannot be called normally, how can I repair the file?
Hi)
I'm not sure. But according to doc write() and close() is allowed in signal handlers: https://man7.org/linux/man-pages/man7/signal-safety.7.html so it's theoretically possible to call MP4E_close on app abnormal termination.
If MP4E_close is not called, in default mode there almost impossible to to repair data since all frames stored in 1 mdat and without indexes frames length is unknown.
In sequential mode repair process is somewhat real since each frame resides in individual mdat and have known length. But still not simple, you need restore some meta info like codecs used and which individual mdat belongs to what track which is complex task too, but can be simple for 1 track file case.
If fragmented mode file should be decodable to last complete mdat/moof fragment.
Hi)
I'm not sure. But according to doc write() and close() is allowed in signal handlers: https://man7.org/linux/man-pages/man7/signal-safety.7.html so it's theoretically possible to call MP4E_close on app abnormal termination.
If MP4E_close is not called, in default mode there almost impossible to to repair data since all frames stored in 1 mdat and without indexes frames length is unknown.
In sequential mode repair process is somewhat real since each frame resides in individual mdat and have known length. But still not simple, you need restore some meta info like codecs used and which individual mdat belongs to what track which is complex task too, but can be simple for 1 track file case.
If fragmented mode file should be decodable to last complete mdat/moof fragment.
Thank you for giving me some inspiration, I will try to fix it