]> git.ipfire.org Git - thirdparty/asterisk.git/commit
channel: write to a stream on multi-frame writes
authorKevin Harwell <kharwell@digium.com>
Tue, 31 Mar 2020 17:52:44 +0000 (12:52 -0500)
committerKevin Harwell <kharwell@digium.com>
Tue, 31 Mar 2020 18:05:50 +0000 (13:05 -0500)
commita03cb7552309f4539acff78e66f5126def2e533c
treebc489432424f06a8a89ae1a63e603a012447cf63
parent96923ec8713028ad8d236a0314af600724356cfd
channel: write to a stream on multi-frame writes

If a frame handling routine returns a list of frames (vs. a single frame)
those frames are never passed to a tech's write_stream handler even if one is
available. For instance, if a codec translation occurred and that codec
returned multiple frames then those particular frames were always only sent
to the tech's "write" handler. If that tech (pjsip for example) was stream
capable then those frames were essentially ignored. Thus resulting in bad
audio.

This patch makes it so the "write_stream" handler is appropriately called
for all cases, and for all frames if available.

ASTERISK-28795 #close

Change-Id: I868faea0b73a07ed5a32c2b05bb9cf4b586f739d
main/channel.c