[asterisk-commits] frame.c: Copy the whole subclass in ast frdup(). (asterisk[13])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Apr 6 14:58:20 CDT 2016
Joshua Colp has submitted this change and it was merged.
Change subject: frame.c: Copy the whole subclass in ast_frdup().
......................................................................
frame.c: Copy the whole subclass in ast_frdup().
The problem is ast_frdup() does not copy whole frame.subclass for voice,
video and image frames, only the format is copied. For video frames, the
subclass structure contains the .frame_ending flag used to put the RTP
marker where it needs to be.
ASTERISK-25894 #close
Change-Id: I812ca90e84ed5d4f473b997d0dd0d3c5a915fe33
---
M main/frame.c
1 file changed, 2 insertions(+), 3 deletions(-)
Approvals:
Richard Mudgett: Looks good to me, but someone else must approve
Matt Jordan: Looks good to me, approved
Joshua Colp: Verified
diff --git a/main/frame.c b/main/frame.c
index 64af882..b5ab985 100644
--- a/main/frame.c
+++ b/main/frame.c
@@ -320,11 +320,10 @@
}
out->frametype = f->frametype;
+ out->subclass = f->subclass;
if ((f->frametype == AST_FRAME_VOICE) || (f->frametype == AST_FRAME_VIDEO) ||
(f->frametype == AST_FRAME_IMAGE)) {
- out->subclass.format = ao2_bump(f->subclass.format);
- } else {
- memcpy(&out->subclass, &f->subclass, sizeof(out->subclass));
+ ao2_bump(out->subclass.format);
}
out->datalen = f->datalen;
out->samples = f->samples;
--
To view, visit https://gerrit.asterisk.org/2539
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I812ca90e84ed5d4f473b997d0dd0d3c5a915fe33
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Jacek Konieczny <jkonieczny at eggsoft.pl>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
More information about the asterisk-commits
mailing list