FFmpeg 멀티스레드 질문드립니다.

park3250의 이미지

안녕하세요
FFmpeg 영상 스플릿, 먹싱하는 라이브러리가 있는데요

이를 멀티스레드에서 개별적으로 라이브러리 객체를 생성해서
스플릿, 먹싱 테스트를 하려고 하는데요

락부분까지 추가되어있는데 멀티스레드로 실행하다보면

1.
[aac @ 0x7efc14002f20] [h264 @ 0x7efc10001f40] Insufficient thread locking around avcodec_open/close()
Insufficient thread locking around avcodec_open/close()
[NULL @ 0x7efc1400fac0] Insufficient thread locking around avcodec_open/close()
[aac @ 0x7efc10002f20] Insufficient thread locking around avcodec_open/close()
[aac @ 0x7efc10002f20] Insufficient thread locking around avcodec_open/close()
Assertion ff_avcodec_locked failed at libavcodec/utils.c:3059
Abort (core dumped)

2.
corrupted double-linked list

이런 에러메시지들 출력되고 core 파일 gdb로 분석해보면
#0 0x000000327ec76052 in malloc_consolidate () from /lib64/libc.so.6
#1 0x000000327ec78c88 in _int_free () from /lib64/libc.so.6

이부분에서 죽었다고 나오는데..
전혀 감이 안잡히네요ㅜ

혹시 아시는분 답변좀 부탁드릴게요..

bushi의 이미지

있는 "FFmpeg 영상 스플릿, 먹싱하는 라이브러리" 가 av_lockmgr_register() 을 제대로 쓰는 상황에서도 그런다면 ffmpeg/libavcodec 의 버그라 생각됩니다.
av_lockmgr_register() 의 예제는 ffplay.c

park3250의 이미지

감사합니다..