Opened 4 years ago

Closed 4 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 4 years ago.

Download all attachments as: .zip

Change History (3)

Changed 4 years ago by lbrulet

comment:1 Changed 4 years ago by cehoyos

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 Changed 4 years ago by cehoyos

  • Keywords udp added
  • Resolution set to fixed
  • Status changed from new to closed

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

Note: See TracTickets for help on using tickets.