lavfi: add dctdnoiz filter.
ffmpeg: free threads on error conditions.

Fixes Ticket2562

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>