[FFmpeg-devel] [PATCH] pngdec: frame multithreading support
Michael Niedermayer
michaelni at gmx.at
Wed Aug 21 05:39:07 CEST 2013
On Tue, Aug 20, 2013 at 11:04:58PM +0000, Paul B Mahol wrote:
> Signed-off-by: Paul B Mahol <onemda at gmail.com>
> ---
> libavcodec/pngdec.c | 71 +++++++++++++++++++++++++++++++++++++++--------------
> 1 file changed, 53 insertions(+), 18 deletions(-)
deadlocks with some damaged files
Id Target Id Frame
16 Thread 0x7fffe598a700 (LWP 31556) "ffmpeg_g" pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
15 Thread 0x7fffe618b700 (LWP 31555) "ffmpeg_g" pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
14 Thread 0x7fffe698c700 (LWP 31554) "ffmpeg_g" pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
13 Thread 0x7fffe718d700 (LWP 31553) "ffmpeg_g" pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
12 Thread 0x7fffe798e700 (LWP 31552) "ffmpeg_g" pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
11 Thread 0x7fffe818f700 (LWP 31551) "ffmpeg_g" pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
10 Thread 0x7fffe8990700 (LWP 31550) "ffmpeg_g" pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
9 Thread 0x7fffe9191700 (LWP 31549) "ffmpeg_g" pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
8 Thread 0x7fffe9992700 (LWP 31548) "ffmpeg_g" pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
7 Thread 0x7fffea193700 (LWP 31547) "ffmpeg_g" pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
6 Thread 0x7fffea994700 (LWP 31546) "ffmpeg_g" pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
5 Thread 0x7fffeb195700 (LWP 31545) "ffmpeg_g" pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
4 Thread 0x7fffeb996700 (LWP 31544) "ffmpeg_g" pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
3 Thread 0x7fffec197700 (LWP 31543) "ffmpeg_g" pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
2 Thread 0x7fffec998700 (LWP 31542) "ffmpeg_g" pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
* 1 Thread 0x7ffff7faa780 (LWP 31538) "ffmpeg_g" pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
(gdb) bt
#0 pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1 0x00000000008e0d6b in ff_thread_decode_frame (avctx=0x174cfe0, picture=0x173eea0, got_picture_ptr=0x7fffffffdcd8, avpkt=0x7fffffffda00) at libavcodec/pthread.c:631
#2 0x0000000000980b84 in avcodec_decode_video2 (avctx=0x174cfe0, picture=0x173eea0, got_picture_ptr=0x7fffffffdcd8, avpkt=0x7fffffffdc20) at libavcodec/utils.c:1979
#3 0x0000000000424086 in decode_video (ist=0x174ecc0, pkt=0x7fffffffdc20, got_output=0x7fffffffdcd8) at ffmpeg.c:1668
#4 0x0000000000424f13 in output_packet (ist=0x174ecc0, pkt=0x7fffffffdda0) at ffmpeg.c:1866
#5 0x000000000042aae3 in process_input (file_index=0) at ffmpeg.c:3085
#6 0x000000000042ae62 in transcode_step () at ffmpeg.c:3181
#7 0x000000000042af6f in transcode () at ffmpeg.c:3233
#8 0x000000000042b49a in main (argc=8, argv=0x7fffffffe3c8) at ffmpeg.c:3411
#0 pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1 0x00000000008e106b in ff_thread_await_progress (f=0x1752330, n=2147483647, field=0) at libavcodec/pthread.c:692
#2 0x00000000008d26f3 in decode_frame (avctx=0x1753120, data=0x17529f0, got_frame=0x1752c60, avpkt=0x1752980) at libavcodec/pngdec.c:842
#3 0x00000000008e0103 in frame_worker_thread (arg=0x1752880) at libavcodec/pthread.c:339
#4 0x00007ffff0467e9a in start_thread (arg=0x7fffe618b700) at pthread_create.c:308
#5 0x00007ffff0194ccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#6 0x0000000000000000 in ?? ()
the rest have backtraces like this:
#0 pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1 0x00000000008e003b in frame_worker_thread (arg=0x1752ca0) at libavcodec/pthread.c:330
#2 0x00007ffff0467e9a in start_thread (arg=0x7fffe598a700) at pthread_create.c:308
#3 0x00007ffff0194ccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#4 0x0000000000000000 in ?? ()
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
it is not once nor twice but times without number that the same ideas make
their appearance in the world. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130821/d15b37fb/attachment.asc>
More information about the ffmpeg-devel
mailing list