mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-17 20:37:04 +00:00
avcodec/mpegaudiodec_template: decode_frame_mp3on4: conceal errors in decoding instead of discarding data
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
2545182c29
commit
afbe8c6a84
@ -1953,8 +1953,13 @@ static int decode_frame_mp3on4(AVCodecContext *avctx, void *data,
|
|||||||
if (m->nb_channels > 1)
|
if (m->nb_channels > 1)
|
||||||
outptr[1] = out_samples[s->coff[fr] + 1];
|
outptr[1] = out_samples[s->coff[fr] + 1];
|
||||||
|
|
||||||
if ((ret = mp_decode_frame(m, outptr, buf, fsize)) < 0)
|
if ((ret = mp_decode_frame(m, outptr, buf, fsize)) < 0) {
|
||||||
return ret;
|
av_log(avctx, AV_LOG_ERROR, "failed to decode channel %d\n", ch);
|
||||||
|
memset(outptr[0], 0, MPA_FRAME_SIZE*sizeof(OUT_INT));
|
||||||
|
if (m->nb_channels > 1)
|
||||||
|
memset(outptr[1], 0, MPA_FRAME_SIZE*sizeof(OUT_INT));
|
||||||
|
ret = m->nb_channels * MPA_FRAME_SIZE*sizeof(OUT_INT);
|
||||||
|
}
|
||||||
|
|
||||||
out_size += ret;
|
out_size += ret;
|
||||||
buf += fsize;
|
buf += fsize;
|
||||||
|
Loading…
Reference in New Issue
Block a user