Skip to content
Snippets Groups Projects
Commit d5b7d5ea authored by Philip-Dylan Gleonec's avatar Philip-Dylan Gleonec Committed by Pierre Lespagnol
Browse files

media_decoder: enable libopus FEC by default

By default, sets the option to use FEC decoding with libopus when
preparing the decoder context.

Issue: #5155
Change-Id: Icc9dcbbd9df3f538eb2da794e2ff9b6a0380bdc2
parent 00770b03
No related branches found
No related tags found
No related merge requests found
...@@ -526,6 +526,11 @@ MediaDecoder::prepareDecoderContext() ...@@ -526,6 +526,11 @@ MediaDecoder::prepareDecoderContext()
if (decoderCtx_->framerate.num == 0 || decoderCtx_->framerate.den == 0) if (decoderCtx_->framerate.num == 0 || decoderCtx_->framerate.den == 0)
decoderCtx_->framerate = {30, 1}; decoderCtx_->framerate = {30, 1};
} }
if (avStream_->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) {
if (decoderCtx_->codec_id == AV_CODEC_ID_OPUS) {
av_opt_set_int(decoderCtx_, "decode_fec", 1, AV_OPT_SEARCH_CHILDREN);
}
}
return 0; return 0;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment