<div>Hi</div><div><br></div><div>I am trying to decode some Amrnb audio using the avcodec_decode_audio3 function. I want to input frame by frame and save the raw output frame by frame as well.</div><div><br></div><font color="#ff0000"><b>int len = avcodec_decode_audio3(mpCodecContext, (short *)outbuf, &out_size, &pkt);</b></font><div>
<br></div><div>Now, the issue is that when I give the input of a frame of 32 bytes without the AMR header, i got the len >0, but the outsize value is always 640 that I am sure is not correct and I am also able to read the 640 values in the output buffer.</div>
<div><br></div><div>When i try to extract the raw audio from my media file, using the standalone ffmpeg windows build i get a different output, which is correct. I have used the following command:</div><div><br></div><div>
<div><b><font color="#ff0000">ffmpeg -i input.amr -f amr Output.raw</font></b></div></div><div><b><font color="#ff0000"><br></font></b></div><div><b>Now, I am not sure if the output of </b><b style="color:rgb(255,0,0)">avcodec_decode_audio3 function </b><b>is correct or  not as even if i send the bugger input say 64 byte or 128 or the whole while at one go, the output buffer size is always 640 bytes.</b></div>
<div><b><br></b></div><div><b>Can someone let me know where I am doing the mistake for the same as I want the same out as the standalone .</b></div><div><b style="color:rgb(255,0,0)"><br></b></div><div><b style="color:rgb(255,0,0)">I have the sample attached which I am trying to decode also I have attached the sample code which I am using to decode.</b></div>
<div><b style="color:rgb(255,0,0)"><br></b></div><div><b style="color:rgb(255,0,0)"><br></b></div><div><b style="color:rgb(255,0,0)"><br></b></div><div><b style="color:rgb(255,0,0)">Regards</b></div><div><b style="color:rgb(255,0,0)">Nitin</b></div>
<div><b style="color:rgb(255,0,0)"><br></b></div><div><b style="color:rgb(255,0,0)"><br></b></div>