projects
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
56daf10
)
mlpdec: do not try to allocate a zero-sized output buffer.
author
Anton Khirnov
<anton@khirnov.net>
Thu, 14 Feb 2013 13:05:35 +0000
(14:05 +0100)
committer
Anton Khirnov
<anton@khirnov.net>
Sat, 23 Feb 2013 12:05:31 +0000
(13:05 +0100)
CC:libav-stable@libav.org
libavcodec/mlpdec.c
patch
|
blob
|
history
diff --git
a/libavcodec/mlpdec.c
b/libavcodec/mlpdec.c
index cf01b6e23c70d5ce4f17c584657d439eac695ff1..130ce26d6c4cf928896e9cfb60e729e43628e999 100644
(file)
--- a/
libavcodec/mlpdec.c
+++ b/
libavcodec/mlpdec.c
@@
-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) {