Commit dd787db8 authored by Pierre Lespagnol's avatar Pierre Lespagnol Committed by Pierre Lespagnol

videoDecode: fix error detection

Flag AV_EF_EXPLODE not supported for mpeg4

Change-Id: Ia6c22b31847652443a7a06dab3a26ecd4f4e9076
Reviewed-by: Philippe Gorley's avatarPhilippe Gorley <philippe.gorley@savoirfairelinux.com>
parent c560f407
......@@ -242,7 +242,11 @@ MediaDecoder::setupStream(AVMediaType mediaType)
#endif
JAMI_DBG() << "Decoding " << streamType << " using " << inputDecoder_->long_name << " (" << inputDecoder_->name << ")";
decoderCtx_->err_recognition = (AV_EF_CRCCHECK | AV_EF_BITSTREAM | AV_EF_BUFFER | AV_EF_EXPLODE | AV_EF_CAREFUL | AV_EF_COMPLIANT | AV_EF_AGGRESSIVE);
decoderCtx_->err_recognition = (AV_EF_CRCCHECK | AV_EF_BITSTREAM | AV_EF_BUFFER | AV_EF_CAREFUL | AV_EF_COMPLIANT | AV_EF_AGGRESSIVE);
if(inputDecoder_->id != AV_CODEC_ID_MPEG4)
decoderCtx_->err_recognition |= AV_EF_EXPLODE;
ret = avcodec_open2(decoderCtx_, inputDecoder_, nullptr);
if (ret < 0) {
JAMI_ERR() << "Could not open codec: " << libav_utils::getError(ret);
......
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