diff options
author | Jacek Konieczny <jkonieczny@eggsoft.pl> | 2016-04-06 15:01:47 +0200 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2016-04-06 11:10:49 -0500 |
commit | 8ed5f611523e7f435433fa695fef8334e9101f36 (patch) | |
tree | 2768a50bf0aebea0674d01c0d3b5e2b865045c47 /main | |
parent | 97db0ca884c7fe9ba09934ffd3cbe2499c3d4ff4 (diff) |
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
Diffstat (limited to 'main')
-rw-r--r-- | main/frame.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/main/frame.c b/main/frame.c index ae2120a5a..92b92b6e2 100644 --- a/main/frame.c +++ b/main/frame.c @@ -320,11 +320,10 @@ struct ast_frame *ast_frdup(const struct ast_frame *f) } 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; |