summaryrefslogtreecommitdiff
path: root/main/slinfactory.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/slinfactory.c')
-rw-r--r--main/slinfactory.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/main/slinfactory.c b/main/slinfactory.c
index 6171eb2e2..5061a609e 100644
--- a/main/slinfactory.c
+++ b/main/slinfactory.c
@@ -72,11 +72,13 @@ int ast_slinfactory_feed(struct ast_slinfactory *sf, struct ast_frame *f)
sf->format = f->subclass;
}
}
+ if (!(begin_frame = ast_translate(sf->trans, f, 0)) || !(duped_frame = ast_frdup(begin_frame)))
+ return 0;
+ } else {
+ if (!(duped_frame = ast_frdup(f)))
+ return 0;
}
- if ((sf->trans && (!(begin_frame = ast_translate(sf->trans, f, 0)))) || (!(duped_frame = ast_frdup(begin_frame))))
- return 0;
-
x = 0;
AST_LIST_TRAVERSE(&sf->queue, frame_ptr, frame_list)
x++;