On Tue, 12 Apr 2016, sebechlebsky...@gmail.com wrote:
From: Jan Sebechlebsky <sebechlebsky...@gmail.com> Calling close_slave in case error is to be returned from open_slave will free allocated resources. Since failure can happen before bsfs array is initialized, close_slave must check that bsfs is not NULL before accessing tee_slave->bsfs[i] element. Slave muxer expects write_trailer to be called if it's write_header suceeded (so resources allocated in write_header are freed). Therefore if failure happens after successfull write_header call, we must ensure that write_trailer of that particular slave is called.
Hmm, I guess you are right, I see no other way freeing resources allocated in write_header then calling write_trailer. It does make the code a bit more complex, but I don't really see a way to make it more simple.
So this looks good to me. Nicolas, any ideas improving this? Thanks, Marton _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel