]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 186379 via svnmerge from
authorDavid Vossel <dvossel@digium.com>
Fri, 3 Apr 2009 16:38:36 +0000 (16:38 +0000)
committerDavid Vossel <dvossel@digium.com>
Fri, 3 Apr 2009 16:38:36 +0000 (16:38 +0000)
https://origsvn.digium.com/svn/asterisk/trunk

........
  r186379 | dvossel | 2009-04-03 11:29:47 -0500 (Fri, 03 Apr 2009) | 4 lines

  audio_audiohook_write_list() did not correctly update sample size after ast_translate.

  audio_audiohook_write_list() did not take into account that the sample size may change after translation depending on if the original frame is is 8khz or 16khz.  the sample size is now updated after translating to reflect this possibility.  This caused the audio on the receiving end to sound terrible.  Thanks to jcolp and mmichelson for helping me work this out.

  (issue AST-197)
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@186381 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/audiohook.c

index 640ec2f5aa252743b9e73f062673585c635b8398..baf370dc7326c6d6e5ca7ca8f3c2a11ad035eb14 100644 (file)
@@ -576,6 +576,7 @@ static struct ast_frame *audio_audiohook_write_list(struct ast_channel *chan, st
                }
                if (!(middle_frame = ast_translate(in_translate->trans_pvt, frame, 0)))
                        return frame;
+               samples = middle_frame->samples;
        }
 
        /* Queue up signed linear frame to each spy */