diff options
-rw-r--r-- | include/asterisk/translate.h | 2 | ||||
-rw-r--r-- | main/frame.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/include/asterisk/translate.h b/include/asterisk/translate.h index f4673944c..97f10283f 100644 --- a/include/asterisk/translate.h +++ b/include/asterisk/translate.h @@ -147,7 +147,7 @@ struct ast_trans_pvt { struct timeval nextin; struct timeval nextout; unsigned int destroy:1; -} attribute_packed; +}; /*! \brief generic frameout function */ struct ast_frame *ast_trans_frameout(struct ast_trans_pvt *pvt, diff --git a/main/frame.c b/main/frame.c index d46dd239c..3100636c5 100644 --- a/main/frame.c +++ b/main/frame.c @@ -321,6 +321,9 @@ static void frame_cache_cleanup(void *data) void ast_frame_free(struct ast_frame *fr, int cache) { + if (ast_test_flag(fr, AST_FRFLAG_FROM_TRANSLATOR)) + ast_translate_frame_freed(fr); + if (!fr->mallocd) return; @@ -356,9 +359,6 @@ void ast_frame_free(struct ast_frame *fr, int cache) #endif ast_free(fr); } - - if (ast_test_flag(fr, AST_FRFLAG_FROM_TRANSLATOR)) - ast_translate_frame_freed(fr); } /*! |