]> git.ipfire.org Git - thirdparty/asterisk.git/commit
frame: Better handle interpolated frames.
authorJoshua Colp <jcolp@digium.com>
Wed, 26 Apr 2017 10:38:31 +0000 (10:38 +0000)
committerJoshua Colp <jcolp@digium.com>
Wed, 26 Apr 2017 10:46:52 +0000 (10:46 +0000)
commitae696132a27238b432cfd532e14e5b7aa2c0f247
tree25d34a3a1dc91b75a98cd7a021097f9c34dd0de7
parent95313c5f9edab84f9fe7f49089b33b0b60372b87
frame: Better handle interpolated frames.

Interpolated frames are frames which contain a number of
samples but have no actual data. Audiohooks did not
handle this case when translating an incoming frame into
signed linear. It assumed that a frame would always contain
media when it may not. If this occurs audiohooks will now
immediately return and not act on the frame.

As well for users of ast_trans_frameout the function has
been changed to be a bit more sane and ensure that the data
pointer on a frame is set to NULL if no data is actually
on the frame. This allows the various spots in Asterisk that
check for an interpolated frame based on the presence of a
data pointer to work as expected.

ASTERISK-26926

Change-Id: I7fa22f631fa28d540722ed789ce28e84c7f8662b
main/audiohook.c
main/translate.c