-
Notifications
You must be signed in to change notification settings - Fork 76
Description
I'm using beamcoder to save an RTP-OPUS stream into an OGG-OPUS file.
I have an SDP/RTP demuxer that is feeding into an OGG-OPUS muxer. It's using a very simple demuxer.read
/ muxer.writeFrame
loop. It's all working fine, but I'm running into problems shutting it down when I'm done saving.
My first approach was to call demuxer.forceClose
to try and unblock the unresolved demuxer.read
promise. This, however, is generating a segmentation fault. I suspect it is related to this issue: #53 If you'd like, I can provide more debugging information, but it's probably redundant.
My next idea is to try and set the interrupt_callback
in the AVFormatContext struct. See https://github.com/FFmpeg/FFmpeg/blob/3da35b7cc7e2f80ca4af89e55fef9a7bcb19c128/libavformat/avformat.h#L1503
This would require patching beamcoder. I think it would probably go before avformat_open_input
is called. Maybe around here:
Line 55 in ab226a7
if ((ret = avformat_open_input(&c->format, c->filename, c->iformat, &c->options))) { |
Could you let me know if I'm on the right path? Is there a better way to close an RTP demuxer early?
Thanks for your help! beamcoder has been a lifesaver!