file: Ensure nativeformats remains valid for lifetime of use.
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:02:48 +0000 (11:02 -0500)
commit17b6ba49efcd9ca33c6202eb88bf6748fc0f3ebf
tree1318c66ae06a9a4bbed175d798c7a517b5e5fdbd
parent380ac201acf29efb2a69a4ef668a8d7da387f47b
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