ffplay: factorize decoder functions to generic decoder