swresample/swresample: fix sample drop loop end condition