diff options
Diffstat (limited to 'libavformat/brstm.c')
-rw-r--r-- | libavformat/brstm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/brstm.c b/libavformat/brstm.c index e8a1eaa022..1470690731 100644 --- a/libavformat/brstm.c +++ b/libavformat/brstm.c @@ -403,8 +403,8 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt) (32 + 4 + size) > (INT_MAX / par->channels) || (32 + 4 + size) * par->channels > INT_MAX - 8) return AVERROR_INVALIDDATA; - if (av_new_packet(pkt, 8 + (32 + 4 + size) * par->channels) < 0) - return AVERROR(ENOMEM); + if ((ret = av_new_packet(pkt, 8 + (32 + 4 + size) * par->channels)) < 0) + return ret; dst = pkt->data; if (par->codec_id == AV_CODEC_ID_ADPCM_THP_LE) { bytestream_put_le32(&dst, size * par->channels); |