On 2/11/20 7:48 pm, Andreas Rheinhardt wrote: > > Zane van Iperen: >> The format doesn't allow for anything else. >> >> Signed-off-by: Zane van Iperen <z...@zanevaniperen.com> >> --- >> libavcodec/adpcm.c | 5 ++++- >> libavcodec/utils.c | 2 +- >> 2 files changed, 5 insertions(+), 2 deletions(-) >> >> diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c >> index 701b125c47..d34fd6c6e1 100644 >> --- a/libavcodec/adpcm.c >> +++ b/libavcodec/adpcm.c >> @@ -110,6 +110,7 @@ static av_cold int adpcm_decode_init(AVCodecContext * >> avctx) >> unsigned int max_channels = 2; >> >> switch(avctx->codec->id) { >> + case AV_CODEC_ID_ADPCM_IMA_AMV: >> case AV_CODEC_ID_ADPCM_IMA_CUNNING: >> max_channels = 1; >> break; >> @@ -1684,6 +1685,8 @@ static int adpcm_decode_frame(AVCodecContext *avctx, >> void *data, >> } >> break; >> case AV_CODEC_ID_ADPCM_IMA_AMV: >> + av_assert0(avctx->channels == 1); >> + > > Which check ensures that this assert won't be triggered? >
At the very top of the patch, just above "case AV_CODEC_ID_ADPCM_IMA_CUNNING:". max_channels is set to 1, so it'll bail before it gets to the assert. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".