aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/frame.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/main/frame.c b/main/frame.c
index 16f5d5a58..b38f2df9e 100644
--- a/main/frame.c
+++ b/main/frame.c
@@ -431,6 +431,11 @@ struct ast_frame *ast_frisolate(struct ast_frame *fr)
}
if (!(fr->mallocd & AST_MALLOCD_DATA)) {
+ if (!fr->datalen) {
+ out->data.uint32 = fr->data.uint32;
+ out->mallocd = AST_MALLOCD_HDR | AST_MALLOCD_SRC;
+ return out;
+ }
if (!(newdata = ast_malloc(fr->datalen + AST_FRIENDLY_OFFSET))) {
if (out->src != fr->src) {
ast_free((void *) out->src);