resample: check memory allocations in av_resample_init()