Fixed #8686: Update h264 to use new FFMPEG API

This commit is contained in:
akallabeth 2023-02-14 07:48:54 +01:00 committed by akallabeth
parent 498ddbf23e
commit 7f55c97d60
2 changed files with 4 additions and 0 deletions

View File

@ -235,8 +235,10 @@ static BOOL tsmf_ffmpeg_init_stream(ITSMFDecoder* decoder, const TS_AM_MEDIA_TYP
}
}
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(59, 18, 100)
if (mdecoder->codec->capabilities & AV_CODEC_CAP_TRUNCATED)
mdecoder->codec_context->flags |= AV_CODEC_FLAG_TRUNCATED;
#endif
return TRUE;
}

View File

@ -529,10 +529,12 @@ static BOOL libavcodec_init(H264_CONTEXT* h264)
goto EXCEPTION;
}
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(59, 18, 100)
if (sys->codecDecoder->capabilities & AV_CODEC_CAP_TRUNCATED)
{
sys->codecDecoderContext->flags |= AV_CODEC_FLAG_TRUNCATED;
}
#endif
#ifdef WITH_VAAPI