<div>Hi List,<br></div><div><br></div><div>I write live transcoder for our IP-cameras, in some cases audio straem also need to transcoder.</div><div>But I have a problem with non-equal frame_size in input codec context and output codec context:</div>

<div>1. I read audio packet</div><div>2. I decode it with avcodec_decode_audio4()</div><div>It provides AVFrame's with nb_samples = 1152, but when I open output codec it have frame_size = 576 and when I encode audio frame I take error message:</div>

<div>    more samples than frame size (avcodec_encode_audio2)</div><div><br></div><div>I think that I must split one AVFrame into two or more and encode this resulting frames. Is it valid way? Do I must do it manualy with av_samples_copy? How I can recalculate PTS for resulting frames?</div>
<div><br></div><div>Thanks for answers.</div><div><br></div><div>PS output format is FLV with default video and audio codecs.</div><div><br></div>