[asterisk-bugs] [Asterisk 0016610]: [patch] [OpenSolaris] wav format produces garbage files

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Jan 25 19:27:41 CST 2011


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=16610 
====================================================================== 
Reported By:                bklang
Assigned To:                seanbright
====================================================================== 
Project:                    Asterisk
Issue ID:                   16610
Category:                   Formats/format_wav
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     closed
Asterisk Version:           SVN 
JIRA:                       SWP-728 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!): 240280 
Request Review:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             2010-01-14 20:34 CST
Last Modified:              2011-01-25 19:27 CST
====================================================================== 
Summary:                    [patch] [OpenSolaris] wav format produces garbage
files
Description: 
I was toying with changing the recording format for voicemail files on my
server.  The GSM format had been working fine to both record and playback
files.  However switching voicemail.conf to create wav files results in
garbage data.  The files do not play back at all on several platforms,
including the server that recorded it.

I also attempted to record wav audio using the Record() dialplan
application.  The same garbage files resulted.  Here is what the console
says when trying to playback one of the files:

[Jan 14 21:27:53] WARNING[14811]: app_playback.c:471 playback_exec:
ast_streamfile failed on SIP/F27564A6-8B0D-408E-00000028 for
/tmp/1263522240.57
[Jan 14 21:27:53] WARNING[14811]: format_wav.c:95 check_header: Does not
begin with RIFF
[Jan 14 21:27:53] WARNING[14811]: file.c:370 fn_wrapper: Unable to open
format wav

The size of the file produced varies approximately according to duration,
so some data is getting in there.

This does not seem to impact other formats.  Playback of known-good wav
files works fine so it only seems to be a problem writing the wav format.

====================================================================== 

---------------------------------------------------------------------- 
 (0131061) svnbot (reporter) - 2011-01-25 19:27
 https://issues.asterisk.org/view.php?id=16610#c131061 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 304098

_U  trunk/
U   trunk/main/file.c

------------------------------------------------------------------------
r304098 | seanbright | 2011-01-25 19:27:40 -0600 (Tue, 25 Jan 2011) | 26
lines

Merged revisions 304097 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r304097 | seanbright | 2011-01-25 20:26:26 -0500 (Tue, 25 Jan 2011) | 19
lines
  
  Merged revisions 304096 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r304096 | seanbright | 2011-01-25 20:24:58 -0500 (Tue, 25 Jan 2011) |
12 lines
    
    Per the man page, setvbuf() must be called before any other operation
on an open file.
    
    We use setvbuf() to associate a buffer with a stream, but we have
already written
    to the open file.  This works (by chance) on Linux, but fails on other
platforms,
    such as OpenSolaris.
    
    (closes issue https://issues.asterisk.org/view.php?id=16610)
    Reported by: bklang
    Patches:
          setvbuf.patch uploaded by crjw (license 963)
    Tested by: bklang, asgaroth, efutch
  ........
................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=304098 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-01-25 19:27 svnbot         Checkin                                      
2011-01-25 19:27 svnbot         Note Added: 0131061                          
======================================================================




More information about the asterisk-bugs mailing list