mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-17 23:38:23 +00:00
Revert 378248. I changed the logic of this function unitentionally, pointed out by file.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@378249 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -283,12 +283,6 @@ static void *newpvt(struct ast_translator *t, const struct ast_format *explicit_
|
|||||||
int len;
|
int len;
|
||||||
char *ofs;
|
char *ofs;
|
||||||
|
|
||||||
/* If we don't have a local init routine, don't bother building the
|
|
||||||
ast_trans_pvt */
|
|
||||||
if (!t->newpvt) {
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* compute the required size adding private descriptor,
|
* compute the required size adding private descriptor,
|
||||||
* buffer, AST_FRIENDLY_OFFSET.
|
* buffer, AST_FRIENDLY_OFFSET.
|
||||||
@@ -315,7 +309,7 @@ static void *newpvt(struct ast_translator *t, const struct ast_format *explicit_
|
|||||||
ast_format_copy(&pvt->explicit_dst, explicit_dst);
|
ast_format_copy(&pvt->explicit_dst, explicit_dst);
|
||||||
}
|
}
|
||||||
/* call local init routine, if present */
|
/* call local init routine, if present */
|
||||||
if (t->newpvt(pvt)) {
|
if (t->newpvt && t->newpvt(pvt)) {
|
||||||
ast_free(pvt);
|
ast_free(pvt);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user