<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>What about heap size? Do you have enough free space there?<br>
I've had same problem on SAMS70N21, and I've solved it with
freeing more space for dynamic allocation.</p>
<p>Best regards.<br>
Mirko<br>
</p>
<br>
<div class="moz-cite-prefix">On 5.6.2017 18:05, Jean-Marc Valin
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:998982bf-596e-621f-28a0-f41c8e7f5310@jmvalin.ca">
<pre wrap="">On 05/06/17 08:28 AM, Ulisses Piassa wrote:
</pre>
<blockquote type="cite">
<pre wrap="">I ported all the files from OpusLib 1.1.4 needed to compile the project,
but when I try to create and OpusDecode state, it returns the error -7
(OPUS_ALLOC_FAIL).
</pre>
</blockquote>
<pre wrap="">
Are you getting OPUS_ALLOC_FAIL on the opus_decoder_init() too or just
on opus_decoder_create()?
</pre>
<blockquote type="cite">
<pre wrap="">I'm compiling it with the USE_ALLOCA flag. I also tried to compile it
with the flags OVERRIDE_OPUS_ALLOC OVERRIDE_OPUS_FREE
'opus_alloc(x)=NULL' and 'opus_free(x)=NULL', but still having no success.
</pre>
</blockquote>
<pre wrap="">
when you use OVERRIDE_OPUS_ALLOC and opus_alloc(x)=NULL you're
essentially saying "I don't have a working malloc()", so none of the
calls to the *_create() functions can work, it's normal that you're
seeing those fail with OPUS_ALLOC_FAIL because there's no way the
library is able to allocate memory.
</pre>
<blockquote type="cite">
<pre wrap="">The code I wrote is:
int size;
int error;
OpusDecoder* dec;
size = opus_decoder_get_size(1);
dec = (OpusDecoder *) malloc(size);
error = opus_decoder_init(dec, 8000, 1);
</pre>
</blockquote>
<pre wrap="">
This version should actually work and I don't see how
opus_decoder_init() could return OPUS_ALLOC_FAIL since it's not
allocating anything. Are you sure that's what it returns?
Jean-Marc
_______________________________________________
opus mailing list
<a class="moz-txt-link-abbreviated" href="mailto:opus@xiph.org">opus@xiph.org</a>
<a class="moz-txt-link-freetext" href="http://lists.xiph.org/mailman/listinfo/opus">http://lists.xiph.org/mailman/listinfo/opus</a>
</pre>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<br>
<table>
<tbody>
<tr>
<td style="padding: 0 8px 0 0;" valign="center">
<div style="float: left; display: ;"> <img
src="cid:part1.571739E8.FF854699@ars-es.com"
height="57" width="146"> </div>
</td>
<td style="border-left: 2px solid #cc0000; padding: 0 0 0
8px;" valign="top">
<div style="display: ;"> <span style="font-size: 14px;
font-family: 'arial';">Mirko Divac</span> </div>
<span style="display: ;"> <span style="font-size: 11px;
font-family: 'arial'; font-weight: bold; ">Research
and Development Engineer</span>, </span> <span
style="display: ;"> <span style="font-size: 11px;
font-family: 'arial'; ">ARS Embedded Systems LLC</span>
</span>
<div style="padding: 12px 0 0 0;"> <span style="display:
;"> <span style="font-size: 11px; color: #ababab;
font-family: 'arial';">p:</span> <span
style="font-size: 11px; font-family: 'arial';">+381
62 471 534</span> </span> <span style="display: ;">
<span style="font-size: 11px; color: #ababab;
font-family: 'arial'; ">a:</span> <span
style="font-size: 11px; font-family: 'arial';">Jovana
Subotića 9, 21000, Novi Sad, Serbia</span> </span>
<div> <span style="display: ;"> <span
style="font-size: 11px; color: #ababab;
font-family: 'arial';">w:</span> <span><font
size="2"><font=arial><a
href="http://www.engineering.ars-es.com"
target="_blank" style="color: #000;
text-decoration: 'arial'; font-size: 11px;
font-family: 'arial';">www.engineering.ars-es.com</a></font=arial></font></span>
</span> <span style="display: ;"> <span
style="font-size: 11px; color: #ababab;
font-family: 'arial'; ">e:</span> <span><font
size="2"><font=arial><a
href="mailto:mirko.divac@ars-es.com"
target="_blank" style="color: #000;
text-decoration: 'arial'; font-size: 11px;
font-family: 'arial'; ">mirko.divac@ars-es.com</a></font=arial></font></span>
</span> </div>
</div>
<div style="padding: 12px 0 0 0;"> </div>
</td>
</tr>
</tbody>
</table>
<br>
</div>
<div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2">
<br /><br />
<hr style='border:none; color:#909090; background-color:#B0B0B0; height: 1px; width: 99%;' />
<table style='border-collapse:collapse;border:none;'>
<tr>
<td style='border:none;padding:0px 15px 0px 8px'>
<a href="https://www.avast.com/antivirus">
<img border=0 src="http://static.avast.com/emails/avast-mail-stamp.png" alt="Avast logo" />
</a>
</td>
<td>
<p style='color:#3d4d5a; font-family:"Calibri","Verdana","Arial","Helvetica"; font-size:12pt;'>
Ovaj email je proveren na maliciozne programe od strane Avast antivirus softvera.
<br><a href="https://www.avast.com/antivirus">www.avast.com</a>
</p>
</td>
</tr>
</table>
<br />
<a href="#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"> </a></div></body>
</html>