summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorNicolas Dufresne <nicolas.dufresne@collabora.com>2016-03-24 19:23:12 -0400
committerNicolas Dufresne <nicolas.dufresne@collabora.com>2016-03-24 19:30:44 -0400
commit284d723a9a9bb2f68ba54ad0aad3b16fa16e6f96 (patch)
tree4657ecf7b4af5089c6916dd4553184f449f6343e /ext
parentd738fa0787c1eb77be1e304ea225433cf0db0414 (diff)
vpxdec: Use threads on multi-core systems
This is a redo of commit b848c1b6ffd1e508228820a013f94fb445e4777f. The code was lost when the elements where ported to use a baseclass. https://bugzilla.gnome.org/show_bug.cgi?id=764169
Diffstat (limited to 'ext')
-rw-r--r--ext/vpx/gstvpxdec.c6
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);