Skip to content
Snippets Groups Projects
Commit be489ba3 authored by Philippe Gorley's avatar Philippe Gorley Committed by Andreas Traczyk
Browse files

decoder: disable accel if disabled in settings

Change-Id: Ic38d6cb9d75411bad22013af7eed737a3a09487a
parent 0b9dd0e6
No related branches found
No related tags found
No related merge requests found
......@@ -118,6 +118,7 @@ MediaDemuxer::openInput(const DeviceParams& params)
if(!params.pixel_format.empty()){
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;
avcodec_free_context(&decoderCtx_);
#ifdef RING_ACCEL
// 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();
#endif
inputDecoder_ = findDecoder(avStream_->codecpar->codec_id);
if (!inputDecoder_) {
JAMI_ERR() << "Unsupported codec";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment