diff options
-rw-r--r-- | ext/vpx/gstvpxdec.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/vpx/gstvpxdec.c b/ext/vpx/gstvpxdec.c index d955ef09a..42619c541 100644 --- a/ext/vpx/gstvpxdec.c +++ b/ext/vpx/gstvpxdec.c @@ -577,7 +577,11 @@ gst_vpx_dec_open_codec (GstVPXDec * dec, GstVideoCodecFrame * frame) cfg.w = stream_info.w; cfg.h = stream_info.h; - cfg.threads = dec->threads; + + if (dec->threads > 0) + cfg.threads = dec->threads; + else + cfg.threads = g_get_num_processors (); caps = vpx_codec_get_caps (vpxclass->codec_algo); |