avcodec/libaom: fix setting amount of threads
authorJames Almer <jamrial@gmail.com>
Thu, 13 Sep 2018 16:26:00 +0000 (13:26 -0300)
committerJames Almer <jamrial@gmail.com>
Thu, 13 Sep 2018 16:44:45 +0000 (13:44 -0300)
commit309c3a0e81be553626711912e90015c26f4b09ba
treec59533b618d88a3a919b52134266295e8776fada
parent776cdd1dc8e1dd653459b196aae229155a6d8470
avcodec/libaom: fix setting amount of threads

The libaom doxy says that a value of 0 for the threads fields is
equivalent to a value of 1, whereas for avctx->thread_count it means
the maximum amount of threads possible for the host system.

Use av_cpu_count() to get the correct thread count when auto threads
is requested.

Reviewed-by: Jan Ekström <jeebjp@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
libavcodec/libaomdec.c
libavcodec/libaomenc.c