Opened 13 years ago

Closed 13 years ago

#915 closed defect (fixed)

UDP Protocol : seg fault on closing

Reported by: lbrulet Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: udp
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

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.

Attachments (1)

udp_close.patch (1.6 KB ) - added by lbrulet 13 years ago.

Download all attachments as: .zip

Change History (3)

by lbrulet, 13 years ago

Attachment: udp_close.patch added

comment:1 by Carl Eugen Hoyos, 13 years ago

Please send patches to ffmpeg-devel, they get more attention there.
And please drop the brackets or move the opening one on the same line as "if".

comment:2 by Carl Eugen Hoyos, 13 years ago

Keywords: udp added
Resolution: fixed
Status: newclosed

The patch was applied, thank you for the report and the solution!

Note: See TracTickets for help on using tickets.