UDP Protocol : seg fault on closing
|Reported by:||lbrulet||Owned by:|
|Blocking:||Reproduced by developer:||no|
|Analyzed by developer:||no|
Calling avformat_close_input on a UDP stream (Mpeg TS for example), is sometimes resulting in a segfault.
After analysis, I think the problem is in libavformat/udp.c : the thread circular_buffer_thread is not joined in udp_close. Then, sometimes, the circular_buffer_task routine is still executing with a freed context.
A simple patch proposal is attached.