diff options
author | Steve Murphy <murf@digium.com> | 2006-09-25 14:49:56 +0000 |
---|---|---|
committer | Steve Murphy <murf@digium.com> | 2006-09-25 14:49:56 +0000 |
commit | 184e006352c417e0b2c06187670b752dda603699 (patch) | |
tree | 18e8711a2613c7dea8471b091c39da30187a62fc | |
parent | c479c2518277a7f16f44242729c2b67d71080a4b (diff) |
This tiny fix prevents asterisk from crashing if trying to play an OGG moh file.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43604 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r-- | formats/format_ogg_vorbis.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/formats/format_ogg_vorbis.c b/formats/format_ogg_vorbis.c index d1122924a..5fc17c338 100644 --- a/formats/format_ogg_vorbis.c +++ b/formats/format_ogg_vorbis.c @@ -440,12 +440,13 @@ static struct ast_frame *ogg_vorbis_read(struct ast_filestream *fs, int samples_in; int samples_out = 0; struct vorbis_desc *s = (struct vorbis_desc *)fs->private; - short *buf = (short *)(fs->fr.data); /* SLIN data buffer */ + short *buf; /* SLIN data buffer */ fs->fr.frametype = AST_FRAME_VOICE; fs->fr.subclass = AST_FORMAT_SLINEAR; fs->fr.mallocd = 0; AST_FRAME_SET_BUFFER(&fs->fr, fs->buf, AST_FRIENDLY_OFFSET, BUF_SIZE); + buf = (short *)(fs->fr.data); /* SLIN data buffer */ while (samples_out != SAMPLES_MAX) { float **pcm; |