[libav-api] Multithreading in H264 decoder.

Andrey Utkin andrey.krieger.utkin at gmail.com
Fri Oct 28 13:26:15 CEST 2011

2011/10/28 wl2776 <wl2776 at gmail.com>

> Is it stable? How can I use it?
> My application is a win32 ActiveX, and I've compiled libav myself with
> --enable-w32threads switch using MingGW-w64.
> I used build script from http://ffmpeg.zeranoe.com/blog/ to build this
> MingW.
> From studying libav sources I've found that multithreading feature is
> controlled via AVCodecContext::active_thread_type variable.
> However, in my instance of the H264 codec context this variable is always
> 0.
> I tried setting it to 1, but my application anyway seems to have only
> single
> thread for decoding.
> I also could not find any code in the source, which assigns this variable
> non-zero value.

I set AVCodecContext::thread_count to 0 (default was 1), and libx264 decides
automatically, how many threads to make. Likely you can also set desired
positive value straightly.

Andrey Utkin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libav.org/pipermail/libav-api/attachments/20111028/6c83da39/attachment.html>

More information about the libav-api mailing list