Video format was treated as audio when removed from the file playback scheduler
authorMatthew Jordan <mjordan@digium.com>
Fri, 11 Nov 2011 21:57:46 +0000 (21:57 +0000)
committerMatthew Jordan <mjordan@digium.com>
Fri, 11 Nov 2011 21:57:46 +0000 (21:57 +0000)
commit60f51c002a31e3a84b0446890f0357dfaffb85fd
tree874b88b3f562ac43304d3511b3dcb813acc6383a
parent863d7189b911009df848512478fe0c163ce0cd70
Video format was treated as audio when removed from the file playback scheduler

This patch fixes the format type check in ast_closestream and
filestream_destructor.  Previously a comparison operator was used, but since
audio formats are no longer contiguous (and AST_FORMAT_AUDIO_MASK includes
formats that have a value greater than the video formats), a bitwise AND
operation is used instead.  Duplicated code was also moved to filestream_close.

(closes issue ASTERISK-18682)
Reported by: Aldo Bedrij
Tested by: Matt Jordan

Review: https://reviewboard.asterisk.org/r/1580/
........

Merged revisions 344823 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 344842 from http://svn.asterisk.org/svn/asterisk/branches/10

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@344844 65c4cc65-6c06-0410-ace0-fbb531ad65f3
main/file.c