<html><head></head><body><div style="color:#000; background-color:#fff; font-family:Helvetica Neue-Light, Helvetica Neue Light, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif;font-size:16px"><div id="yui_3_16_0_ym19_1_1461796465459_131764">I am trying to get my code to work and failing miserably.</div><div id="yui_3_16_0_ym19_1_1461796465459_131549"><br></div><div id="yui_3_16_0_ym19_1_1461796465459_131535">I have a file opened which has an audio stream in AC3, 48k, Stereo, fltp, 192kb/s</div><div id="yui_3_16_0_ym19_1_1461796465459_131544"><br></div><div id="yui_3_16_0_ym19_1_1461796465459_131562">I am trying to output this as MP2, 64k, Stereo, S16, 32 kb/s</div><div id="yui_3_16_0_ym19_1_1461796465459_131585"><br></div><div id="yui_3_16_0_ym19_1_1461796465459_131730">Now my code goes through the svr_convert and gives me a 1040 sample buffer from the 1536 input sample buffer.</div><div id="yui_3_16_0_ym19_1_1461796465459_131729"><br></div><div id="yui_3_16_0_ym19_1_1461796465459_131683">When I go to convert it using avcodec_encode_audio2, this this frame i get the following</div><div id="yui_3_16_0_ym19_1_1461796465459_131691"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1461796465459_131716">[mp2 @ xxxxxxxxxxx] nb_samples (1040) != frame_size (1536) (avencode_encoder_audio2)</div><div id="yui_3_16_0_ym19_1_1461796465459_131790" dir="ltr"><br></div><div id="yui_3_16_0_ym19_1_1461796465459_131780" dir="ltr">So my question is do I have to split the input to be the correct size or am i missing something in the audio encoding setup to allow it to do the buffering correctly?<br></div><div id="yui_3_16_0_ym19_1_1461796465459_131506"><span id="yui_3_16_0_ym19_1_1461796465459_131717"></span></div><div id="yui_3_16_0_ym19_1_1461796465459_131456"> </div><div id="yui_3_16_0_ym19_1_1461796465459_131457" class="signature">Joolz</div></div></body></html>