[asterisk-bugs] [JIRA] (ASTERISK-16633) [patch] downsampling slinear16 to slinear (or ulaw or alaw or g729) results in truncation

Sean Bright (JIRA) noreply at issues.asterisk.org
Thu Dec 14 10:26:07 CST 2017


     [ https://issues.asterisk.org/jira/browse/ASTERISK-16633?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sean Bright closed ASTERISK-16633.
----------------------------------

    Resolution: Cannot Reproduce

Per Alexander Traud, this is no longer reproducible with the latest Asterisk 13 release.

> [patch] downsampling slinear16 to slinear (or ulaw or alaw or g729) results in truncation
> -----------------------------------------------------------------------------------------
>
>                 Key: ASTERISK-16633
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-16633
>             Project: Asterisk
>          Issue Type: Bug
>          Components: Codecs/General
>            Reporter: Paul Albrecht
>            Severity: Minor
>         Attachments: test_translate.c
>
>
> When I translate from AST_FORMAT_SLINEAR16 to AST_FORMAT_SLINEAR the output frame is truncated, specifically, instead of 160 samples I get 137 samples. The result is the same for ulaw and alaw. For g729, the output is truncated to 80 samples.
> ****** ADDITIONAL INFORMATION ******
> Here's how I initialize the frame I use for translation:
> static struct ast_frame f;
> static unsigned char data[AST_FRIENDLY_OFFSET + 640];
> f.data.ptr = (void *)(data + AST_FRIENDLY_OFFSET);
> f.frametype = AST_FRAME_VOICE;
> f.subclass = AST_FORMAT_SLINEAR16;
> f.samples = 320;
> f.offset = AST_FRIENDLY_OFFSET;
> f.datalen = 640;
> Here's how I translate the frame:
> trans = ast_translator_build_path(AST_FORMAT_SLINEAR,AST_FORMAT_SLINEAR16);
> out = ast_translate(trans,f,0)
> Here's how I log the result:
> ast_log( LOG_NOTICE, "my output frame: subclass %d, samples %d, offset %d, datalen %d\n", out->subclass, out->samples, out->offset,out->datalen) ;



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list