CC:[email protected]
---
libavcodec/mlpdec.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c
index 596433e..160f359 100644
--- 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)) < 0) {
--
1.7.10.4
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel