mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-02-13 19:05:37 +00:00
mlpdec: do not try to allocate a zero-sized output buffer.
CC:libav-stable@libav.org
This commit is contained in:
parent
56daf10e03
commit
0dff40bfb9
1 changed files with 5 additions and 0 deletions
|
|
@ -984,6 +984,11 @@ static int output_data(MLPDecodeContext *m, unsigned int substr,
|
|||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
if (!s->blockpos) {
|
||||
av_log(avctx, AV_LOG_ERROR, "No samples to output.\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
/* get output buffer */
|
||||
frame->nb_samples = s->blockpos;
|
||||
if ((ret = ff_get_buffer(avctx, frame)) < 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue