Opened 8 years ago
Last modified 7 years ago
#2319 open defect
mencoder crashes while attempting multithreaded encode via lavc codecs
Reported by: | AndrewR | Owned by: | beastd |
---|---|---|---|
Priority: | normal | Component: | mencoder |
Version: | HEAD | Severity: | major |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Reproduced by developer: | yes | Analyzed by developer: | no |
Description
Summary of the bug:
How to reproduce:
% mencoder pond.dv -o pond-reencoded-3.dv -ovc lavc -lavcopts vcodec=dvvideo:format=411p:threads=2 -oac pcm version: MEncoder SVN-r37930-4.9.2 ...
Attachments (1)
Change History (4)
by , 8 years ago
Attachment: | valgrind.log added |
---|
comment:1 by , 8 years ago
File pond.dv can be downloaded from http://libdv.sourceforge.net/
Resulted re-encoded file is not playable in mplayer. If I use threads=1 for encoding - it works ok. Attempt at using another vcodec (mjpeg) also resulted in crash and corrupted file. mplayer/mencoder both use internal ffmpeg (commit ac24a8202a6fdfb469af1fa68d537fb2f8d1ba6a - libavformat/mov: Fix memory leak, need to free the chapter tracks array)
comment:2 by , 8 years ago
Reproduced by developer: | set |
---|---|
Status: | new → open |
I think I could reproduce the crash.
Will look into it as time permits.
comment:3 by , 7 years ago
After a long delay I came back to investigate this problem more.
It turns out this is a problem since FFmpeg commit beb9447 . That commit enabled frame threading for dvvideo. That lead to your encode using both slice and frame threading, which triggered the bug you reported here.
A simple workaround to make it work like before is to tell the FFmpeg dvvideo encoder to use slice threading only:
mencoder pond.dv -o pond-reencoded-3.dv -ovc lavc -lavcopts vcodec=dvvideo:format=411p:threads=2:o=thread_type=-frame -oac pcm
valgrind -v log