video: don't restrict --vd-lavc-threads to a maximum of 16

Only do it when the number of threads is autodetected, as more than 16
threads are still considered not recommended. (libavcodec prints a
warning.)
This commit is contained in:
wm4 2015-07-23 17:17:26 +02:00
parent 5b47836082
commit 281c21b7f1
2 changed files with 5 additions and 4 deletions

View File

@ -824,10 +824,11 @@ Video
Set framedropping mode used with ``--framedrop`` (see skiploopfilter for Set framedropping mode used with ``--framedrop`` (see skiploopfilter for
available skip values). available skip values).
``--vd-lavc-threads=<0-16>`` ``--vd-lavc-threads=<N>``
Number of threads to use for decoding. Whether threading is actually Number of threads to use for decoding. Whether threading is actually
supported depends on codec. 0 means autodetect number of cores on the supported depends on codec (default: 0). 0 means autodetect number of cores
machine and use that, up to the maximum of 16 (default: 0). on the machine and use that, up to the maximum of 16. You can set more than
16 threads manually.

View File

@ -98,7 +98,7 @@ const struct m_sub_options vd_lavc_conf = {
OPT_DISCARD("skipidct", skip_idct, 0), OPT_DISCARD("skipidct", skip_idct, 0),
OPT_DISCARD("skipframe", skip_frame, 0), OPT_DISCARD("skipframe", skip_frame, 0),
OPT_DISCARD("framedrop", framedrop, 0), OPT_DISCARD("framedrop", framedrop, 0),
OPT_INTRANGE("threads", threads, 0, 0, 16), OPT_INT("threads", threads, M_OPT_MIN, .min = 0),
OPT_FLAG("bitexact", bitexact, 0), OPT_FLAG("bitexact", bitexact, 0),
OPT_FLAG("check-hw-profile", check_hw_profile, 0), OPT_FLAG("check-hw-profile", check_hw_profile, 0),
OPT_KEYVALUELIST("o", avopts, 0), OPT_KEYVALUELIST("o", avopts, 0),