]> git.ipfire.org Git - thirdparty/asterisk.git/commit
file: Ensure nativeformats remains valid for lifetime of use. 65/2765/2
authorJoshua Colp <jcolp@digium.com>
Thu, 5 May 2016 10:07:50 +0000 (07:07 -0300)
committerJoshua Colp <jcolp@digium.com>
Thu, 5 May 2016 16:03:30 +0000 (13:03 -0300)
commit6d4928a1352ceeb4d0996511ddc5ddfc64793514
treed78b86a82790bea17d9ea9e5950b2da1ca328b8b
parent3294ac1efe241256e994baeb24b6c48c9abbb20c
file: Ensure nativeformats remains valid for lifetime of use.

It is possible for the nativeformats of a channel to change
throughout its lifetime. As a result a user of it needs to either
ensure the channel is locked when accessing the formats or keep
a reference to the nativeformats themselves.

This change fixes the file playback support so it keeps a
reference to the nativeformats when accessing things.

ASTERISK-25998 #close

Change-Id: Ie45b65475e1481ddf05b874ee48f63e39fff8915
main/file.c