Commit be489ba3 authored by Philippe Gorley's avatar Philippe Gorley Committed by Andreas Traczyk

decoder: disable accel if disabled in settings

Change-Id: Ic38d6cb9d75411bad22013af7eed737a3a09487a
parent 0b9dd0e6
......@@ -118,6 +118,7 @@ MediaDemuxer::openInput(const DeviceParams& params)
av_dict_set(&options_, "pixel_format", params.pixel_format.c_str(), 0);
JAMI_DBG("Trying to open device %s with format %s, pixel format %s, size %dx%d, rate %lf", params.input.c_str(),
params.format.c_str(), params.pixel_format.c_str(), params.width, params.height, params.framerate.real());
......@@ -263,6 +264,12 @@ MediaDecoder::setupStream()
int ret = 0;
// if there was a fallback to software decoding, do not enable accel
// it has been disabled already by the video_receive_thread/video_input
enableAccel_ &= Manager::instance().videoPreferences.getDecodingAccelerated();
inputDecoder_ = findDecoder(avStream_->codecpar->codec_id);
if (!inputDecoder_) {
JAMI_ERR() << "Unsupported codec";
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