<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div>Hi,</div><div><br></div><div>I'm using below functions to implement audio resampling, but encounter one issue.</div><div><br></div><div>swr_alloc_set_opts(), swr_init(), swr_convert_frame(), swr_get_delay().</div><div><br></div><div>Input frame is set to 8000hz mono AV_SAMPLE_FMT_FLT, while output frame is set to 44100Hz mono AV_SAMPLE_FMT_S16, and output frame's nb_samples is set to 80.</div><div><br></div><div><span style="line-height: 23.8px;">swr_get_delay() is used to check whether resampler can ouput one frame with 80 audio samples or not. If the return value from </span><span style="line-height: 23.8px;">swr_get_delay() is less than 80, </span><span style="line-height: 23.8px;">swr_convert_frame() will called next time when input audio samples are feed into resampler. Or </span><span style="line-height: 23.8px;">swr_convert_frame() is used to flush resampler to output one audio frame with 80 samples.</span></div><div><span style="line-height: 23.8px;"><br></span></div><div>But I encounter one issue. <span style="line-height: 23.8px;">swr_get_delay().returns 88, which is larger than 80, and means audio resampler can be flushed to output one full audio frame with 80 samples. Resampler only outputs 41 samples, and next time output 0 samples, but </span><span style="line-height: 23.8px;">swr_get_delay() always return 88. Why? is this a bug in ffmpeg?</span></div><div><span style="line-height: 23.8px;"><br></span></div><div><span style="line-height: 23.8px;">Thanks!</span></div><div><span style="line-height: 23.8px;"><br></span></div><div><span style="line-height: 23.8px;">B.R.</span></div><div><span style="line-height: 23.8px;"><br></span></div><div><span style="line-height: 23.8px;">Andrew</span></div></div><br><br><span title="neteasefooter"><p> </p></span>