Opened 6 months ago

Closed 6 months ago

Last modified 6 months ago

#10694 closed defect (fixed)

hb_font_destroy exception on multi thread

Reported by: harf Owned by:
Priority: minor Component: avfilter
Version: 6.0 Keywords: harfbuzz
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
How to reproduce:

using ffmpeg api in C
libavfilter/vf_drawtext.c
static void hb_destroy(HarfbuzzData *hb) {
line: 1661 hb_font_destroy(hb->font);
}
exception occurs when running more than one thread only
ffmpeg version 6.1
built on mac

Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.

Change History (3)

comment:1 by Elon Musk, 6 months ago

Priority: criticalminor
Resolution: invalid
Status: newclosed

No valid ticket, Missing all information.

comment:2 by harf, 6 months ago

To fix the issue you need:
pthread_mutex_lock(&lock);
av_buffersink_get_frame_flags(...);
pthread_mutex_unlock(&lock);

ffmpeg version 6.0 uses harfbuzz lib, which uses freetype lib which has an issue on multithead access.

comment:3 by harf, 6 months ago

Resolution: invalidfixed
Note: See TracTickets for help on using tickets.