diff --git a/main/frame.c b/main/frame.c index 711f9e15f1..e9e3663530 100644 --- a/main/frame.c +++ b/main/frame.c @@ -817,9 +817,7 @@ int ast_frame_adjust_volume_float(struct ast_frame *f, float adjustment) if ((f->frametype != AST_FRAME_VOICE) || !(ast_format_cache_is_slinear(f->subclass.format))) { return -1; - } - - if (!adjustment) { + } else if (!adjustment || (f->samples > f->datalen)) { return 0; }