Commit 3ecf78d6 authored by moto's avatar moto Committed by Facebook GitHub Bot
Browse files

Set filter graph #threads to 1 (#2985)

Summary:
FilterGraph supports multi threading, and by default, the number of threads is determined automatically.

Rather than an automatic behavior, which is unpredictable, it is better to fix the number of threads to 1.

Follow-up: Add an interface to adjust it.

Similar to https://github.com/pytorch/audio/pull/2949.

Pull Request resolved: https://github.com/pytorch/audio/pull/2985

Reviewed By: nateanl

Differential Revision: D42526958

Pulled By: mthrok

fbshipit-source-id: c4f7f95317e93a39378107636a3ca30f6ddfe466
parent 9b7b64e4
...@@ -12,6 +12,8 @@ FilterGraph::FilterGraph(AVMediaType media_type) : media_type(media_type) { ...@@ -12,6 +12,8 @@ FilterGraph::FilterGraph(AVMediaType media_type) : media_type(media_type) {
default: default:
TORCH_CHECK(false, "Only audio and video type is supported."); TORCH_CHECK(false, "Only audio and video type is supported.");
} }
pFilterGraph->nb_threads = 1;
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment