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
ast_verb(3,"<%s> Playing '%s.%s' (language '%s')\n",ast_channel_name(chan),filename,ast_format_get_name(ast_channel_writeformat(chan)),preflang?preflang:"default");
if(VERBOSITY_ATLEAST(3)){
ast_channel_lock(chan);
ast_verb(3,"<%s> Playing '%s.%s' (language '%s')\n",ast_channel_name(chan),filename,ast_format_get_name(ast_channel_writeformat(chan)),preflang?preflang:"default");