summaryrefslogtreecommitdiffstats
path: root/libavcodec/flacdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-08-10 00:03:13 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-08-10 00:21:55 +0200
commit6fac4826249d8f3fd5ac5fd0a3e44893c58ccef6 (patch)
tree1847d2d1ceb3488895e1f158e17a08c218bc810d /libavcodec/flacdec.c
parent70b8668fb532a7efd2953822872285d1e9947375 (diff)
downloadffmpeg-streaming-6fac4826249d8f3fd5ac5fd0a3e44893c58ccef6.zip
ffmpeg-streaming-6fac4826249d8f3fd5ac5fd0a3e44893c58ccef6.tar.gz
avcodec/flacdec: fix handling of av_samples_fill_arrays() return value
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/flacdec.c')
-rw-r--r--libavcodec/flacdec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c
index b8d45b8..c9dbc14 100644
--- a/libavcodec/flacdec.c
+++ b/libavcodec/flacdec.c
@@ -130,6 +130,7 @@ static void dump_headers(AVCodecContext *avctx, FLACStreaminfo *s)
static int allocate_buffers(FLACContext *s)
{
int buf_size;
+ int ret;
av_assert0(s->max_blocksize);
@@ -142,9 +143,10 @@ static int allocate_buffers(FLACContext *s)
if (!s->decoded_buffer)
return AVERROR(ENOMEM);
- return av_samples_fill_arrays((uint8_t **)s->decoded, NULL,
+ ret = av_samples_fill_arrays((uint8_t **)s->decoded, NULL,
s->decoded_buffer, s->channels,
s->max_blocksize, AV_SAMPLE_FMT_S32P, 0);
+ return ret < 0 ? ret : 0;
}
/**
OpenPOWER on IntegriCloud